Commit 37d46dc2 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/utils: Check cur_dts in update_initial_timestamps() more

Fixes: runtime error: signed integer overflow: 18133149658382192 - -9223090561878065151 cannot be represented in type 'long long'
Fixes: crbug 831552
Reported-by: 's avatarMatt Wolenetz <wolenetz@google.com>
Reviewed-by: 's avatarMatt Wolenetz <wolenetz@google.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 54432482
...@@ -1129,6 +1129,7 @@ static void update_initial_timestamps(AVFormatContext *s, int stream_index, ...@@ -1129,6 +1129,7 @@ static void update_initial_timestamps(AVFormatContext *s, int stream_index,
if (st->first_dts != AV_NOPTS_VALUE || if (st->first_dts != AV_NOPTS_VALUE ||
dts == AV_NOPTS_VALUE || dts == AV_NOPTS_VALUE ||
st->cur_dts == AV_NOPTS_VALUE || st->cur_dts == AV_NOPTS_VALUE ||
st->cur_dts < INT_MIN + RELATIVE_TS_BASE ||
is_relative(dts)) is_relative(dts))
return; return;
......
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