aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-27 18:20:09 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-08-27 18:29:55 +0200
commit0930a562e7f2f7198f654dc268c71871da047c29 (patch)
treea1a98b4833d2b79b60f4fce9df46ce04e81e4171 /libavformat/utils.c
parentfd85d031626bf1b6af12b4b5444e53c3bb614e3e (diff)
parent0b6adcf76bda8994902f5b6d8e694b0b916ea210 (diff)
downloadffmpeg-0930a562e7f2f7198f654dc268c71871da047c29.tar.gz
Merge commit '0b6adcf76bda8994902f5b6d8e694b0b916ea210' into release/1.1
* commit '0b6adcf76bda8994902f5b6d8e694b0b916ea210': oma: refactor seek function xl: Make sure the width is valid 8bps: Bound-check the input buffer 4xm: Reject not a multiple of 16 dimension alsdec: Clean up error paths alsdec: Fix the clipping range dsicinav: Clip the source size to the expected maximum dsicinav: Bound-check the source buffer when needed dsicinav: K&R formatting cosmetics lavf: Make sure avg_frame_rate can be calculated without integer overflow mov: Do not allow updating the time scale after it has been set mov: Seek back if overreading an individual atom ac3dec: Don't consume more data than the actual input packet size indeo: Reject impossible FRAMETYPE_NULL indeo: Do not reference mismatched tiles Conflicts: libavcodec/4xm.c libavcodec/8bps.c libavcodec/alsdec.c libavcodec/dsicinav.c libavcodec/ivi_common.c libavcodec/xl.c libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index b1a3417bfc..05b8feb277 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2976,6 +2976,9 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
int best_fps = 0;
double best_error = 0.01;
+ if (st->info->codec_info_duration >= INT64_MAX / st->time_base.num / 2||
+ st->info->codec_info_duration_fields >= INT64_MAX / st->time_base.den)
+ continue;
av_reduce(&st->avg_frame_rate.num, &st->avg_frame_rate.den,
st->info->codec_info_duration_fields*(int64_t)st->time_base.den,
st->info->codec_info_duration*2*(int64_t)st->time_base.num, 60000);