diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-12-09 17:01:14 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-12-09 17:46:10 +0100 |
commit | 7c68d5e701511967471b70b14a4ebbeafb423373 (patch) | |
tree | 991c7757ed03685a25313b015db31630229aa855 | |
parent | 0bcc7ea5dc243cae48e0b9c18b3bea717f184f6b (diff) | |
download | ffmpeg-7c68d5e701511967471b70b14a4ebbeafb423373.tar.gz |
avformat/oggdec: Skip streams in duration correction that did not had their duration set.
Fixes: part of 670190.ogg
Fixes integer overflow
Found-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ee2a6f5df8c6a151c3e3826872f1b0a07401c62a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/oggdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c index 8f3b44c3c5..7ecb42ce8f 100644 --- a/libavformat/oggdec.c +++ b/libavformat/oggdec.c @@ -643,6 +643,8 @@ static int ogg_get_length(AVFormatContext *s) int64_t pts; if (i < 0) continue; pts = ogg_calc_pts(s, i, NULL); + if (s->streams[i]->duration == AV_NOPTS_VALUE) + continue; if (pts != AV_NOPTS_VALUE && s->streams[i]->start_time == AV_NOPTS_VALUE && !ogg->streams[i].got_start) { s->streams[i]->duration -= pts; ogg->streams[i].got_start= 1; |