summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <[email protected]>2016-12-09 17:01:14 +0100
committerMichael Niedermayer <[email protected]>2017-02-08 21:17:50 +0100
commita127f51140e92f1e283c0971a21d5546ee803fbb (patch)
tree154f0d334948f4f61196da134470ef08af81ee21
parent07ca8300a6d7f1306892d6bf6a1b6079744ceaa6 (diff)
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 <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit ee2a6f5df8c6a151c3e3826872f1b0a07401c62a) Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r--libavformat/oggdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index 856e0e633e..ffd1703a1a 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -642,6 +642,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;