Commit 1fe94ea7 authored by Ben Boeckel's avatar Ben Boeckel Committed by Michael Niedermayer

vorbis: parse out setup headers as well

Prevents an 'Invalid packet' message. Currently mid-stream setup packets
are ignored. Theoretically, they could, based on the specification, be used to
reinitialize the stream if parameters change, but I don't expect that to be
common (and no one seems to have asked for it).
Signed-off-by: 's avatarBen Boeckel <mathstuf@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 17d87571
......@@ -229,6 +229,8 @@ int av_vorbis_parse_frame_flags(AVVorbisParseContext *s, const uint8_t *buf,
*flags |= VORBIS_FLAG_HEADER;
else if (buf[0] == 3)
*flags |= VORBIS_FLAG_COMMENT;
else if (buf[0] == 5)
*flags |= VORBIS_FLAG_SETUP;
else
goto bad_packet;
......
......@@ -47,6 +47,7 @@ void av_vorbis_parse_free(AVVorbisParseContext **s);
#define VORBIS_FLAG_HEADER 0x00000001
#define VORBIS_FLAG_COMMENT 0x00000002
#define VORBIS_FLAG_SETUP 0x00000004
/**
* Get the duration for a Vorbis packet.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment