[libav-commits] avf: has_duration does not check the global one

Luca Barbato git at libav.org
Fri Apr 13 21:15:43 CEST 2012


Module: libav
Branch: master
Commit: cbf767a87c0e00055d3ebb88053c7cccf814f473

Author:    Luca Barbato <lu_zero at gentoo.org>
Committer: Luca Barbato <lu_zero at gentoo.org>
Date:      Thu Apr 12 22:00:57 2012 -0700

avf: has_duration does not check the global one

Some container formats report a global duration, but not a per stream
one.

---

 libavformat/utils.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 6ebfabb..bcdba8c 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1823,6 +1823,8 @@ static int has_duration(AVFormatContext *ic)
         if (st->duration != AV_NOPTS_VALUE)
             return 1;
     }
+    if (ic->duration)
+        return 1;
     return 0;
 }
 



More information about the libav-commits mailing list