[FFmpeg-cvslog] avformat/oggdec: Skip streams in duration correction that did not had their duration set.

Michael Niedermayer git at videolan.org
Sun Dec 11 02:32:37 EET 2016


ffmpeg | branch: release/3.0 | Michael Niedermayer <michael at niedermayer.cc> | Fri Dec  9 17:01:14 2016 +0100| [7c68d5e701511967471b70b14a4ebbeafb423373] | committer: Michael Niedermayer

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 at google.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit ee2a6f5df8c6a151c3e3826872f1b0a07401c62a)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7c68d5e701511967471b70b14a4ebbeafb423373
---

 libavformat/oggdec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index 8f3b44c..7ecb42c 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;



More information about the ffmpeg-cvslog mailing list