ogg: in ogg_get_length() start from data_offset not 0.
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 14 May 2012 12:03:07 +0000 (14:03 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 14 May 2012 12:15:34 +0000 (14:15 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/oggdec.c

index ab7ab1d..17b9673 100644 (file)
@@ -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) {