diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2018-04-13 11:38:48 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-06-18 01:16:03 +0200 |
commit | 0b5a2c9a52eb4b1e68d01163eada80e6af5ef33e (patch) | |
tree | ad5c2cf1c38ba54f12867512baaa896969af1730 | |
parent | 22a4b599f05e7405bd25d828f967df8740ec63fa (diff) | |
download | ffmpeg-0b5a2c9a52eb4b1e68d01163eada80e6af5ef33e.tar.gz |
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: Matt Wolenetz <wolenetz@google.com>
Reviewed-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 37d46dc21d708192b12aa13617ebe6a117b07363)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/utils.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index afafb59bfe..75adea10e3 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1093,6 +1093,7 @@ static void update_initial_timestamps(AVFormatContext *s, int stream_index, if (st->first_dts != AV_NOPTS_VALUE || dts == AV_NOPTS_VALUE || st->cur_dts == AV_NOPTS_VALUE || + st->cur_dts < INT_MIN + RELATIVE_TS_BASE || is_relative(dts)) return; |