v4l_m2m: add missing AV_CODEC_CAP_DELAY flags
authorwm4 <nfxjfg@googlemail.com>
Thu, 14 Dec 2017 18:46:52 +0000 (19:46 +0100)
committerwm4 <nfxjfg@googlemail.com>
Thu, 21 Dec 2017 17:49:29 +0000 (18:49 +0100)
This is pretty much a requirement for any codec that handles modern
codecs like h264, but it was missing. Potentially could lead to issues
like missing frames at the end of a stream.

Tested-by: Jorge Ramirez <jorge.ramirez-ortiz@linaro.org>
libavcodec/v4l2_m2m_dec.c
libavcodec/v4l2_m2m_enc.c

index c4ea20e..8308613 100644 (file)
@@ -215,7 +215,7 @@ AVCodec ff_ ## NAME ## _v4l2m2m_decoder = { \
     .receive_frame  = v4l2_receive_frame,\
     .close          = ff_v4l2_m2m_codec_end,\
     .bsfs           = bsf_name, \
-    .capabilities   = AV_CODEC_CAP_HARDWARE, \
+    .capabilities   = AV_CODEC_CAP_HARDWARE | AV_CODEC_CAP_DELAY, \
     .wrapper_name   = "v4l2m2m", \
 };
 
index f62ce7c..7e88f4d 100644 (file)
@@ -335,7 +335,7 @@ AVCodec ff_ ## NAME ## _v4l2m2m_encoder = { \
     .send_frame     = v4l2_send_frame,\
     .receive_packet = v4l2_receive_packet,\
     .close          = ff_v4l2_m2m_codec_end,\
-    .capabilities   = AV_CODEC_CAP_HARDWARE, \
+    .capabilities   = AV_CODEC_CAP_HARDWARE | AV_CODEC_CAP_DELAY, \
     .wrapper_name   = "v4l2m2m", \
 };