# HG changeset patch # User bcoudurier # Date 1263930084 0 # Node ID 2db4e4b041572ed29947ccfbe13cd120aea01672 # Parent 9baa7b82a8404588ad15bae45a862a1b80e131ea fetch flv duration from file if it is set to 0 in metadata diff -r 9baa7b82a840 -r 2db4e4b04157 flvdec.c --- a/flvdec.c Mon Jan 18 23:58:10 2010 +0000 +++ b/flvdec.c Tue Jan 19 19:41:24 2010 +0000 @@ -362,7 +362,7 @@ } // if not streamed and no duration from metadata then seek to end to find the duration from the timestamps - if(!url_is_streamed(s->pb) && s->duration==AV_NOPTS_VALUE){ + if(!url_is_streamed(s->pb) && (!s->duration || s->duration==AV_NOPTS_VALUE)){ int size; const int64_t pos= url_ftell(s->pb); const int64_t fsize= url_fsize(s->pb);