[FFmpeg-cvslog] avcodec/decode: EAGAIN is not fully supported in decode_simple_internal()

Michael Niedermayer git at videolan.org
Wed Sep 20 00:20:16 EEST 2023


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Sep 17 02:09:48 2023 +0200| [42b20c93aedffc3bed548d5c4cc1f07b5065ce28] | committer: Michael Niedermayer

avcodec/decode: EAGAIN is not fully supported in decode_simple_internal()

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=42b20c93aedffc3bed548d5c4cc1f07b5065ce28
---

 libavcodec/decode.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index 169ee79acd..466c393c1e 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -457,6 +457,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
     if (ret == AVERROR(EAGAIN))
         av_frame_unref(frame);
 
+    // FF_CODEC_CB_TYPE_DECODE decoders must not return AVERROR EAGAIN
+    // code later will add AVERROR(EAGAIN) to a pointer
+    av_assert0(consumed != AVERROR(EAGAIN));
     if (consumed < 0)
         ret = consumed;
     if (consumed >= 0 && avctx->codec->type == AVMEDIA_TYPE_VIDEO)



More information about the ffmpeg-cvslog mailing list