diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c index ab7ab1d0b8..17b96738a9 100644 --- a/libavformat/oggdec.c +++ b/libavformat/oggdec.c @@ -520,7 +520,7 @@ static int ogg_get_length(AVFormatContext *s) ogg_restore (s, 0); ogg_save (s); - avio_seek (s->pb, 0, SEEK_SET); + avio_seek (s->pb, s->data_offset, SEEK_SET); while (!ogg_read_page (s, &i)){ if (ogg->streams[i].granule != -1 && ogg->streams[i].granule != 0 && ogg->streams[i].codec) {