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 <keiichiw@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
This commit is contained in:
Alexandre Courbot 2022-07-22 11:58:22 +09:00 committed by crosvm LUCI
parent 01e2724335
commit 8e9ebcbfed

View file

@ -572,6 +572,8 @@ impl FfmpegDecoder {
_ => return None, _ => 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 { if codec.capabilities() & AV_CODEC_CAP_DR1 == 0 {
warn!( warn!(
"Skipping codec {} due to lack of DR1 capability.", "Skipping codec {} due to lack of DR1 capability.",