From 8e9ebcbfed9137e1b61980083e03306d7c1c2d22 Mon Sep 17 00:00:00 2001 From: Alexandre Courbot Date: Fri, 22 Jul 2022 11:58:22 +0900 Subject: [PATCH] virtio: video: decoder: ffmpeg: add comment The use of AV_CODEC_CAP_DR1 is not obvious from its name alone, so add a comment about what we are doing here. BUG=None TEST=cargo build --features "video-decoder,ffmpeg" Change-Id: Ib1d38c878ce761fafa85e57076e6d429f63495b5 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3782033 Reviewed-by: Keiichi Watanabe Tested-by: Alexandre Courbot Commit-Queue: Alexandre Courbot --- devices/src/virtio/video/decoder/backend/ffmpeg.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/devices/src/virtio/video/decoder/backend/ffmpeg.rs b/devices/src/virtio/video/decoder/backend/ffmpeg.rs index fedb5caa68..39197dd9a8 100644 --- a/devices/src/virtio/video/decoder/backend/ffmpeg.rs +++ b/devices/src/virtio/video/decoder/backend/ffmpeg.rs @@ -572,6 +572,8 @@ impl FfmpegDecoder { _ => return None, }; + // We require custom buffer allocators, so ignore codecs that are not capable of + // using them. if codec.capabilities() & AV_CODEC_CAP_DR1 == 0 { warn!( "Skipping codec {} due to lack of DR1 capability.",