Commit 4e19cfcf authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarThomas Guilbert <tguilbert@google.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent e90d4e92
......@@ -3818,7 +3818,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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment