aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-10-12 03:00:32 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2018-11-01 00:52:46 +0100
commit1e59d05e48f9e12aa50a3ad89d6a78c281997a6f (patch)
treeb3b882212aa616f8f9a2f07beefeb47c3d5e540e
parenta9ce7cfc594916d55958a9e776104ad70a81fea5 (diff)
downloadffmpeg-1e59d05e48f9e12aa50a3ad89d6a78c281997a6f.tar.gz
avformat/utils: Fix integer overflow in discontinuity check
Fixes: signed integer overflow: 7738135736989908991 - -7954308516317364223 cannot be represented in type 'long' Fixes: find_stream_info_usan Reported-by: Thomas Guilbert <tguilbert@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 4e19cfcfa3944fe4cf97bea758f72f104dcaebad) 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 4df9ba5665..0f6b0f6e53 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3622,7 +3622,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
* sequence, we treat it as a discontinuity. */
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 >
+ (pkt->dts - (uint64_t)st->info->fps_last_dts) / 1000 >
(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,