aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/oggdec.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2011-04-08 01:17:21 +0200
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2011-04-10 01:35:48 +0200
commitd459d8e28df12ee69c71c7181380d91e09764374 (patch)
tree1858169aced68dc5790e8644bfdfddbb667831d9 /libavformat/oggdec.c
parentae7a4a1594e3624f7c844dec44266d2dc74a6be2 (diff)
downloadffmpeg-d459d8e28df12ee69c71c7181380d91e09764374.tar.gz
Abort Ogg header parsing when we encounter a data packet.
Fixes ticket #15.
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 ddc7a1fd5c..148505aa10 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -376,8 +376,7 @@ ogg_packet (AVFormatContext * s, int *str, int *dstart, int *dsize, int64_t *fpo
// 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
@@ -386,8 +385,6 @@ ogg_packet (AVFormatContext * s, int *str, int *dstart, int *dsize, int64_t *fpo
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