aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/flvdec.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2010-01-19 19:41:24 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2010-01-19 19:41:24 +0000
commitfdf4662211fb8e50854e795f47a59753378f2a10 (patch)
treed3dcf201346e584daf1af9ec2ecba222f2a42544 /libavformat/flvdec.c
parent655a1d57d591645ec8fab24cc4f16b396dd94a6c (diff)
downloadffmpeg-fdf4662211fb8e50854e795f47a59753378f2a10.tar.gz
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
Diffstat (limited to 'libavformat/flvdec.c')
-rw-r--r--libavformat/flvdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 9c4314953b..f84ad31c31 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -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);