[FFmpeg-cvslog] avcodec/mpegvideo_enc: Reset stuffing bits if they are not supported

Michael Niedermayer git at videolan.org
Fri Jun 18 22:14:52 EEST 2021


ffmpeg | branch: release/4.4 | Michael Niedermayer <michael at niedermayer.cc> | Sun May 30 18:51:09 2021 +0200| [78b71acab71842317b462786aa26767de9f777f3] | committer: Michael Niedermayer

avcodec/mpegvideo_enc: Reset stuffing bits if they are not supported

Fixes: Assertion failure
Fixes: Ticket8202

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 996797f8ed06e6ccb5287e18a5de88b2b0db31ec)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavcodec/mpegvideo_enc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index eb13d57d2b..69eabc08fe 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -2016,6 +2016,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
             break;
             default:
                 av_log(avctx, AV_LOG_ERROR, "vbv buffer overflow\n");
+                s->stuffing_bits = 0;
             }
             flush_put_bits(&s->pb);
             s->frame_bits  = put_bits_count(&s->pb);



More information about the ffmpeg-cvslog mailing list