From cbf767a87c0e00055d3ebb88053c7cccf814f473 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Thu, 12 Apr 2012 22:00:57 -0700 Subject: [PATCH] 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 file changed, 2 insertions(+) diff --git a/libavformat/utils.c b/libavformat/utils.c index 6ebfabb721..bcdba8c5df 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; }