Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2011-07-04 04:57:47 +0400
committerDiego Biurrun <diego@biurrun.de>2011-07-04 14:54:27 +0400
commit0a94020b5b073d1abf442e28b6db3be785aa680a (patch)
tree6947807cbb7785344b09ef82b17aa587d299500e /libavformat/oggdec.c
parente3759c567db42c8dff255ef9f7258326da470755 (diff)
oggdec: Abort Ogg header parsing when encountering a data packet.
Fixes Bugzilla #11. Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavformat/oggdec.c')
-rw-r--r--libavformat/oggdec.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index 998a33b43c..49f24e9b9b 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