1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Warn if muxing mpeg ps is attempted without a VBV buffer size.

Originally committed as revision 25385 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2010-10-07 01:57:39 +00:00
parent 2dec2bb880
commit 34b9e5bc4f

View File

@ -367,8 +367,10 @@ static int mpeg_mux_init(AVFormatContext *ctx)
stream->id = mpv_id++; stream->id = mpv_id++;
if (st->codec->rc_buffer_size) if (st->codec->rc_buffer_size)
stream->max_buffer_size = 6*1024 + st->codec->rc_buffer_size/8; stream->max_buffer_size = 6*1024 + st->codec->rc_buffer_size/8;
else else{
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 0 #if 0
/* see VCD standard, p. IV-7*/ /* see VCD standard, p. IV-7*/
stream->max_buffer_size = 46 * 1024; stream->max_buffer_size = 46 * 1024;