diff options
author | Justin Johnson <justin.johnson3@gmail.com> | 2010-02-02 22:23:09 +0000 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2010-02-02 22:23:09 +0000 |
commit | c5e1e9827d8aaced8b96a49859a6b0a1cd007d20 (patch) | |
tree | a8e68abd982a78422bfe5b36d13863ddb614a178 /libavformat/flvenc.c | |
parent | a3cc2160e032481f5393304d5b6c61c550d116e7 (diff) | |
download | ffmpeg-c5e1e9827d8aaced8b96a49859a6b0a1cd007d20.tar.gz |
Guess the duration before converting video and write guessed duration
into flv header.
Patch by Justin Johnson, justin D johnson3 A gmail
Originally committed as revision 21615 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/flvenc.c')
-rw-r--r-- | libavformat/flvenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index c255ff0512..cf6b1c566f 100644 --- a/libavformat/flvenc.c +++ b/libavformat/flvenc.c @@ -221,7 +221,7 @@ static int flv_write_header(AVFormatContext *s) put_amf_string(pb, "duration"); flv->duration_offset= url_ftell(pb); - put_amf_double(pb, 0); // delayed write + put_amf_double(pb, s->duration / AV_TIME_BASE); // fill in the guessed duration, it'll be corrected later if incorrect if(video_enc){ put_amf_string(pb, "width"); |