diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-06-21 03:43:16 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-06-21 03:43:16 +0000 |
commit | 8aae202e44cb898a0e35e4afb4d97390118f335a (patch) | |
tree | 0323bd3cc40614bef82501edf127e7c94bbc69b5 /ffserver.c | |
parent | 177d256402136a704f88cb126cf8ab89d2a66a4b (diff) | |
download | ffmpeg-8aae202e44cb898a0e35e4afb4d97390118f335a.tar.gz |
set default preload and max_delay for muxer to avoid mpeg ps muxer to spit many underflow errors, use ffmpeg default values
Originally committed as revision 13850 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffserver.c')
-rw-r--r-- | ffserver.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ffserver.c b/ffserver.c index 6ab62832e5..90ef807192 100644 --- a/ffserver.c +++ b/ffserver.c @@ -2032,6 +2032,14 @@ static int http_prepare_data(HTTPContext *c) } c->fmt_ctx.pb->is_streamed = 1; + /* + * HACK to avoid mpeg ps muxer to spit many underflow errors + * Default value from FFmpeg + * Try to set it use configuration option + */ + c->fmt_ctx.preload = (int)(0.5*AV_TIME_BASE); + c->fmt_ctx.max_delay = (int)(0.7*AV_TIME_BASE); + av_set_parameters(&c->fmt_ctx, NULL); if (av_write_header(&c->fmt_ctx) < 0) { http_log("Error writing output header\n"); |