mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
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 1b1362e408
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
5279e86596
commit
4bcfe9f19c
@ -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 "
|
||||
|
Loading…
Reference in New Issue
Block a user