X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Foggdec.c;h=e1ef21337c820c4fa7164990eae1a3e3685cd886;hb=84d874a680ff647bc84de44967b638f246a8b832;hp=47a0cbae0539d8fb4f4ca174d5ab944cb66dad63;hpb=e999a4ed6c63ae88506bcca98ed1dcc59369e723;p=ffmpeg diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c index 47a0cbae053..e1ef21337c8 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;