Commit 8c1253c9 authored by Michael Niedermayer's avatar Michael Niedermayer

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

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 28d35dbe
...@@ -379,6 +379,10 @@ static av_cold int mpeg_mux_init(AVFormatContext *ctx) ...@@ -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"); 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 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++; s->video_bound++;
break; break;
case AVMEDIA_TYPE_SUBTITLE: case AVMEDIA_TYPE_SUBTITLE:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment