aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-03-07 00:10:11 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2018-07-10 01:18:52 +0200
commit4bcfe9f19c8edf469158e0da6ef8d6e3ba6eec28 (patch)
treedc85a99701381e408962db1020453f1feb924053
parent5279e865961f6eb7bf05c46c6c59835000f5bd50 (diff)
downloadffmpeg-4bcfe9f19c8edf469158e0da6ef8d6e3ba6eec28.tar.gz
avformat/utils: Fix integer overflow of fps_first/last_dts
Fixes: runtime error: signed integer overflow: 7738135736989908991 - -7898362169240453118 cannot be represented in type 'long' Fixes: Chromium bug 796778 Reported-by: Matt Wolenetz <wolenetz@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 1b1362e408cd6acb63fef126b814b0d16562aa8e) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 2f68cf35f0..a658eb22c0 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3326,7 +3326,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
if (st->info->fps_last_dts != AV_NOPTS_VALUE &&
st->info->fps_last_dts_idx > st->info->fps_first_dts_idx &&
(pkt->dts - st->info->fps_last_dts) / 1000 >
- (st->info->fps_last_dts - st->info->fps_first_dts) /
+ (st->info->fps_last_dts - (uint64_t)st->info->fps_first_dts) /
(st->info->fps_last_dts_idx - st->info->fps_first_dts_idx)) {
av_log(ic, AV_LOG_WARNING,
"DTS discontinuity in stream %d: packet %d with DTS "