Browse Source

Abort Ogg header parsing when we encounter a data packet.

Fixes ticket #15.
tags/n0.8
Reimar Döffinger 15 years ago
parent
commit
d459d8e28d
1 changed files with 1 additions and 4 deletions
  1. +1
    -4
      libavformat/oggdec.c

+ 1
- 4
libavformat/oggdec.c View File

@@ -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


Loading…
Cancel
Save