ffmpeg | branch: master | Paul B Mahol <one...@gmail.com> | Thu Sep 21 20:25:37 
2023 +0200| [ea063171903638541a8debded3a828456dd73fc9] | committer: Paul B Mahol

avcodec/osq: do not return immediately on fatal error

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

 libavcodec/osq.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/osq.c b/libavcodec/osq.c
index e2a84657fb..435f3ea7f6 100644
--- a/libavcodec/osq.c
+++ b/libavcodec/osq.c
@@ -411,8 +411,10 @@ static int osq_receive_frame(AVCodecContext *avctx, 
AVFrame *frame)
             ret = ff_decode_get_packet(avctx, s->pkt);
             if (ret == AVERROR_EOF && s->bitstream_size > 0)
                 break;
-            if (ret < 0)
+            if (ret == AVERROR_EOF || ret == AVERROR(EAGAIN))
                 return ret;
+            if (ret < 0)
+                goto fail;
         }
 
         size = FFMIN(s->pkt->size - s->pkt_offset, s->max_framesize - 
s->bitstream_size);

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to