[FFmpeg-cvslog] lavf: Avoid setting avg_frame_rate if delta_dts is negative
Martin Storsjö
git at videolan.org
Tue Oct 8 01:33:17 CEST 2013
ffmpeg | branch: release/1.1 | Martin Storsjö <martin at martin.st> | Fri Sep 20 12:20:06 2013 +0300| [17e7edf75b451edd7dde4816c3225fd1557517c7] | committer: Luca Barbato
lavf: Avoid setting avg_frame_rate if delta_dts is negative
This avoids setting avg_frame_rate to invalid (negative)
values.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
Signed-off-by: Martin Storsjö <martin at martin.st>
(cherry picked from commit ce67f442be0f6c4a8794272873852e256b5b8ee4)
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=17e7edf75b451edd7dde4816c3225fd1557517c7
---
libavformat/utils.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 4f73dfe..b0bfea2 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2499,7 +2499,8 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
double best_error = 0.01;
if (delta_dts >= INT64_MAX / st->time_base.num ||
- delta_packets >= INT64_MAX / st->time_base.den)
+ delta_packets >= INT64_MAX / st->time_base.den ||
+ delta_dts < 0)
continue;
av_reduce(&st->avg_frame_rate.num, &st->avg_frame_rate.den,
delta_packets*(int64_t)st->time_base.den,
More information about the ffmpeg-cvslog
mailing list