Commit 1b1362e4 authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMatt Wolenetz <wolenetz@google.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent da069e9c
...@@ -3778,7 +3778,7 @@ FF_ENABLE_DEPRECATION_WARNINGS ...@@ -3778,7 +3778,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
if (st->info->fps_last_dts != AV_NOPTS_VALUE && if (st->info->fps_last_dts != AV_NOPTS_VALUE &&
st->info->fps_last_dts_idx > st->info->fps_first_dts_idx && st->info->fps_last_dts_idx > st->info->fps_first_dts_idx &&
(pkt->dts - st->info->fps_last_dts) / 1000 > (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)) { (st->info->fps_last_dts_idx - st->info->fps_first_dts_idx)) {
av_log(ic, AV_LOG_WARNING, av_log(ic, AV_LOG_WARNING,
"DTS discontinuity in stream %d: packet %d with DTS " "DTS discontinuity in stream %d: packet %d with DTS "
......
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