]> git.sesse.net Git - ffmpeg/commitdiff
oggdec: Abort Ogg header parsing when encountering a data packet.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Mon, 4 Jul 2011 00:57:47 +0000 (02:57 +0200)
committerDiego Biurrun <diego@biurrun.de>
Mon, 4 Jul 2011 10:54:27 +0000 (12:54 +0200)
Fixes Bugzilla #11.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
libavformat/oggdec.c

index 998a33b43c41dfa0a3542ca89425861139289df1..49f24e9b9b4fcae23f753222af8e52413a860b74 100644 (file)
@@ -373,8 +373,7 @@ static int ogg_packet(AVFormatContext *s, int *str, int *dstart, int *dsize,
 
             // We have reached the first non-header packet in this stream.
             // Unfortunately more header packets may still follow for others,
-            // so we reset this later unless we are done with the headers
-            // for all streams.
+            // but if we continue with header parsing we may lose data packets.
             ogg->headers = 1;
 
             // Update the header state for all streams and
@@ -383,8 +382,6 @@ static int ogg_packet(AVFormatContext *s, int *str, int *dstart, int *dsize,
                 s->data_offset = os->sync_pos;
             for (i = 0; i < ogg->nstreams; i++) {
                 struct ogg_stream *cur_os = ogg->streams + i;
-                if (cur_os->header > 0)
-                    ogg->headers = 0;
 
                 // if we have a partial non-header packet, its start is
                 // obviously at or after the data start