oggdec: Support byte based seeking
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 4 Apr 2013 02:03:07 +0000 (04:03 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 4 Apr 2013 02:04:24 +0000 (04:04 +0200)
Fixed Ticket2317

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/oggdec.c

index fdb5e96..fd954b8 100644 (file)
@@ -735,6 +735,11 @@ static int ogg_read_packet(AVFormatContext *s, AVPacket *pkt)
     int pstart, psize;
     int64_t fpos, pts, dts;
 
+    if (s->io_repositioned) {
+        ogg_reset(s);
+        s->io_repositioned = 0;
+    }
+
     //Get an ogg packet
 retry:
     do {