[FFmpeg-cvslog] avcodec/mediacodecdec: fix return EAGAIN after EOF

Zhao Zhili git at videolan.org
Thu Jan 18 10:58:19 EET 2024


ffmpeg | branch: release/6.1 | Zhao Zhili <zhilizhao at tencent.com> | Sat Nov 18 16:03:11 2023 +0800| [61b88b4dda5e78661ed1042a72d49c3f0d490534] | committer: Zhao Zhili

avcodec/mediacodecdec: fix return EAGAIN after EOF

Signed-off-by: Zhao Zhili <zhilizhao at tencent.com>
(cherry picked from commit f27fce0c0cc67ed2d36d7353d843234829bb2f5f)

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

 libavcodec/mediacodecdec_common.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/mediacodecdec_common.c b/libavcodec/mediacodecdec_common.c
index 1151bb71f9..d6f91e6e89 100644
--- a/libavcodec/mediacodecdec_common.c
+++ b/libavcodec/mediacodecdec_common.c
@@ -804,6 +804,8 @@ int ff_mediacodec_dec_receive(AVCodecContext *avctx, MediaCodecDecContext *s,
         return AVERROR_EXTERNAL;
     }
 
+    if (s->draining && s->eos)
+        return AVERROR_EOF;
     return AVERROR(EAGAIN);
 }
 



More information about the ffmpeg-cvslog mailing list