Browse Source

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 ee2a6f5df8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.2.3
Michael Niedermayer 9 years ago
parent
commit
35ef033a19
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/oggdec.c

+ 2
- 0
libavformat/oggdec.c View File

@@ -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;


Loading…
Cancel
Save