Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-29 19:02:06 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-09-29 19:02:06 +0400
commit8c1253c9349cd68dfcf95298cef5e42f3be7dc14 (patch)
tree39825b1047117fcfd840e54ddf3ccf212c18abeb /libavformat/mpegenc.c
parent28d35dbe9f570025c220c08997bc11e21b3c1a66 (diff)
avformat/mpegenc: check, warn and clip VBV value to within syntactically possible values
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mpegenc.c')
-rw-r--r--libavformat/mpegenc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index 1a7f64a962..6e94f9dab4 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: