[FFmpeg-cvslog] avf: fix faulty check in has_duration
Luca Barbato
git at videolan.org
Thu Apr 26 22:43:20 CEST 2012
ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Tue Apr 24 22:13:02 2012 -0700| [8b97ae64841ed29db9c77db322890656cdc0d354] | committer: Luca Barbato
avf: fix faulty check in has_duration
An invalid duration is AV_NOPTS_VALUE not 0.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8b97ae64841ed29db9c77db322890656cdc0d354
---
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 ffmpeg-cvslog
mailing list