[FFmpeg-cvslog] avcodec/mediacodecenc: Fix return empty packet when bsf is used

Zhao Zhili git at videolan.org
Tue Apr 23 11:12:55 EEST 2024


ffmpeg | branch: release/7.0 | Zhao Zhili <zhilizhao at tencent.com> | Wed Apr 17 12:37:38 2024 +0800| [13e93ffbfd08598b8952aa7ce42ec4abe6d5ebfd] | committer: Zhao Zhili

avcodec/mediacodecenc: Fix return empty packet when bsf is used

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

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

 libavcodec/mediacodecenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c
index 984014f1b1..fcb84ef0ac 100644
--- a/libavcodec/mediacodecenc.c
+++ b/libavcodec/mediacodecenc.c
@@ -533,7 +533,7 @@ static int mediacodec_encode(AVCodecContext *avctx, AVPacket *pkt)
                 return 0;
         }
 
-        if (ret != AVERROR(EAGAIN))
+        if (ret < 0 && ret != AVERROR(EAGAIN))
             return ret;
 
         if (!s->frame->buf[0]) {



More information about the ffmpeg-cvslog mailing list