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-08 19:45:45 +0200
commitd3e6b38a413d645e76327ae9a3296793b865d896 (patch)
treedbd307330880178b02b960e7a6199fc9f5985483
parent4c1d58f937c0f24b6d06bde1a7b5219055e6b4d6 (diff)
downloadffmpeg-d3e6b38a413d645e76327ae9a3296793b865d896.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 4842d9be72..0be779f769 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3600,7 +3600,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
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 "