[FFmpeg-cvslog] oggdec: Abort Ogg header parsing when encountering a data packet.

Reimar Döffinger git at videolan.org
Tue Jul 26 00:53:21 CEST 2011


ffmpeg | branch: release/0.8 | Reimar Döffinger <Reimar.Doeffinger at gmx.de> | Mon Jul  4 02:57:47 2011 +0200| [5a33a29a91fe0c3fc30eb89a0675258f538c6af8] | committer: Reinhard Tartler

oggdec: Abort Ogg header parsing when encountering a data packet.

Fixes Bugzilla #11.

Signed-off-by: Diego Biurrun <diego at biurrun.de>
(cherry picked from commit 0a94020b5b073d1abf442e28b6db3be785aa680a)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5a33a29a91fe0c3fc30eb89a0675258f538c6af8
---

 libavformat/oggdec.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index 998a33b..49f24e9 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -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



More information about the ffmpeg-cvslog mailing list