[SCM] libav/experimental: fetch flv duration from file if it is set to 0 in metadata

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:58:08 UTC 2013


The following commit has been merged in the experimental branch:
commit fdf4662211fb8e50854e795f47a59753378f2a10
Author: Baptiste Coudurier <baptiste.coudurier at gmail.com>
Date:   Tue Jan 19 19:41:24 2010 +0000

    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

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 9c43149..f84ad31 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);

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list