aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-10-03 03:14:09 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-10-03 03:14:09 +0000
commit7e05155850c5f1fee4f7e8b562af9d5cfcbb1d68 (patch)
tree2ca2915c0109533457c698737f5132f3928c643e /libavformat/mpeg.c
parent9205093333e66ec8ccd0985977f6f4a0d6921f14 (diff)
downloadffmpeg-7e05155850c5f1fee4f7e8b562af9d5cfcbb1d68.tar.gz
cleanup video buffer size
Originally committed as revision 3552 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mpeg.c')
-rw-r--r--libavformat/mpeg.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 1f28041d9f..9eaf3b3ac4 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -306,13 +306,18 @@ static int mpeg_mux_init(AVFormatContext *ctx)
break;
case CODEC_TYPE_VIDEO:
stream->id = mpv_id++;
- if (s->is_vcd)
+ if (st->codec.rc_buffer_size)
+ stream->max_buffer_size = 6*1024 + st->codec.rc_buffer_size/8;
+ else
+ stream->max_buffer_size = 230*1024; //FIXME this is probably too small as default
+#if 0
/* see VCD standard, p. IV-7*/
stream->max_buffer_size = 46 * 1024;
else
/* This value HAS to be used for SVCD (see SVCD standard, p. 26 V.2.3.2).
Right now it is also used for everything else.*/
stream->max_buffer_size = 230 * 1024;
+#endif
s->video_bound++;
break;
default: