[libav-commits] avf: fix faulty check in has_duration

Luca Barbato git at libav.org
Wed Apr 25 20:41:02 CEST 2012


Module: libav
Branch: master
Commit: 8b97ae64841ed29db9c77db322890656cdc0d354

Author:    Luca Barbato <lu_zero at gentoo.org>
Committer: Luca Barbato <lu_zero at gentoo.org>
Date:      Tue Apr 24 22:13:02 2012 -0700

avf: fix faulty check in has_duration

An invalid duration is AV_NOPTS_VALUE not 0.

---

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

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



More information about the libav-commits mailing list