From 42b20c93aedffc3bed548d5c4cc1f07b5065ce28 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 17 Sep 2023 02:09:48 +0200 Subject: [PATCH] avcodec/decode: EAGAIN is not fully supported in decode_simple_internal() Signed-off-by: Michael Niedermayer --- 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)