# HG changeset patch # User cehoyos # Date 1265149389 0 # Node ID a427102c12cd268e3fd855e5ee1cc3a85af14994 # Parent dea6e2d5442d93ebcbdfbb4340cf175a841792fd Guess the duration before converting video and write guessed duration into flv header. Patch by Justin Johnson, justin D johnson3 A gmail diff -r dea6e2d5442d -r a427102c12cd flvenc.c --- 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");