mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 19:58:59 +00:00
fetch flv duration from file if it is set to 0 in metadata
Originally committed as revision 21329 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
655a1d57d5
commit
fdf4662211
@ -362,7 +362,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
}
|
||||
|
||||
// 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);
|
||||
|
Loading…
Reference in New Issue
Block a user