mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-04-07 09:48:29 +00:00
oggdec: Abort Ogg header parsing when encountering a data packet.
Fixes Bugzilla #11.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 0a94020b5b
)
This commit is contained in:
parent
683df9bf54
commit
5a33a29a91
@ -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.
|
// We have reached the first non-header packet in this stream.
|
||||||
// Unfortunately more header packets may still follow for others,
|
// Unfortunately more header packets may still follow for others,
|
||||||
// so we reset this later unless we are done with the headers
|
// but if we continue with header parsing we may lose data packets.
|
||||||
// for all streams.
|
|
||||||
ogg->headers = 1;
|
ogg->headers = 1;
|
||||||
|
|
||||||
// Update the header state for all streams and
|
// 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;
|
s->data_offset = os->sync_pos;
|
||||||
for (i = 0; i < ogg->nstreams; i++) {
|
for (i = 0; i < ogg->nstreams; i++) {
|
||||||
struct ogg_stream *cur_os = ogg->streams + 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
|
// if we have a partial non-header packet, its start is
|
||||||
// obviously at or after the data start
|
// obviously at or after the data start
|
||||||
|
Loading…
Reference in New Issue
Block a user