diff flvenc.c @ 5622:a427102c12cd libavformat

Guess the duration before converting video and write guessed duration into flv header. Patch by Justin Johnson, justin D johnson3 A gmail
author cehoyos
date Tue, 02 Feb 2010 22:23:09 +0000
parents bb70b4771e0c
children 536e5527c1e0
line wrap: on
line diff
--- a/flvenc.c	Tue Feb 02 16:47:51 2010 +0000
+++ b/flvenc.c	Tue Feb 02 22:23:09 2010 +0000
@@ -221,7 +221,7 @@
 
     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");