[FFmpeg-cvslog] utils/update_stream_timings: fix division by zero
Michael Niedermayer
git at videolan.org
Mon Sep 10 17:01:51 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Sep 10 16:57:31 2012 +0200| [41dba453f9d164d1aebfea255686e5d267ac118a] | committer: Michael Niedermayer
utils/update_stream_timings: fix division by zero
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=41dba453f9d164d1aebfea255686e5d267ac118a
---
libavformat/utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 0ea8787..948fdcf 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2101,7 +2101,7 @@ static void update_stream_timings(AVFormatContext *ic)
if (end_time != INT64_MIN)
duration = FFMAX(duration, end_time - start_time);
}
- if (duration != INT64_MIN && ic->duration == AV_NOPTS_VALUE) {
+ if (duration != INT64_MIN && duration > 0 && ic->duration == AV_NOPTS_VALUE) {
ic->duration = duration;
}
if (ic->pb && (filesize = avio_size(ic->pb)) > 0 && ic->duration != AV_NOPTS_VALUE) {
More information about the ffmpeg-cvslog
mailing list