[FFmpeg-cvslog] avformat/mpegenc: check, warn and clip VBV value to within syntactically possible values

Michael Niedermayer git at videolan.org
Sun Sep 29 17:09:17 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Sep 29 17:02:06 2013 +0200| [8c1253c9349cd68dfcf95298cef5e42f3be7dc14] | committer: Michael Niedermayer

avformat/mpegenc: check, warn and clip VBV value to within syntactically possible values

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/mpegenc.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index 1a7f64a..6e94f9d 100644
--- a/libavformat/mpegenc.c
+++ b/libavformat/mpegenc.c
@@ -379,6 +379,10 @@ static av_cold int mpeg_mux_init(AVFormatContext *ctx)
                 av_log(ctx, AV_LOG_WARNING, "VBV buffer size not set, muxing may fail\n");
                 stream->max_buffer_size = 230*1024; //FIXME this is probably too small as default
             }
+            if (stream->max_buffer_size > 1024 * 8191) {
+                av_log(ctx, AV_LOG_WARNING, "buffer size %d, too large\n", stream->max_buffer_size);
+                stream->max_buffer_size = 1024 * 8191;
+            }
             s->video_bound++;
             break;
         case AVMEDIA_TYPE_SUBTITLE:



More information about the ffmpeg-cvslog mailing list