avf: has_duration does not check the global one
authorLuca Barbato <lu_zero@gentoo.org>
Fri, 13 Apr 2012 05:00:57 +0000 (22:00 -0700)
committerLuca Barbato <lu_zero@gentoo.org>
Fri, 13 Apr 2012 19:03:16 +0000 (12:03 -0700)
Some container formats report a global duration, but not a per stream
one.

libavformat/utils.c

index 6ebfabb721c78381084112701407e0b4b399edf8..bcdba8c5df4084711f3fb2820df639282bfca301 100644 (file)
@@ -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;
 }