diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-02-02 19:17:25 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-02 19:58:13 +0100 |
commit | 0e9b9a6748aa67c8f272e5eab2b5f7ad6e13d5c9 (patch) | |
tree | 877d31198b223dfc750aae1af4534e336c77fc0a /libavcodec/flacdec.c | |
parent | 23686c72e5aed9778562ccb12fb064b21a0b81fa (diff) | |
download | ffmpeg-0e9b9a6748aa67c8f272e5eab2b5f7ad6e13d5c9.tar.gz |
flacdec: skip in stream header packets
This prevents warning messages on chained oggs with some demuxers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/flacdec.c')
-rw-r--r-- | libavcodec/flacdec.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c index 9d5ecd04cf..eb75729964 100644 --- a/libavcodec/flacdec.c +++ b/libavcodec/flacdec.c @@ -505,6 +505,16 @@ static int flac_decode_frame(AVCodecContext *avctx, void *data, FLAC_MAX_CHANNELS, 32); } + if (buf_size > 5 && !memcmp(buf, "\177FLAC", 5)) { + av_log(s->avctx, AV_LOG_DEBUG, "skiping flac header packet 1\n"); + return buf_size; + } + + if (buf_size > 0 && (*buf & 0x7F) == FLAC_METADATA_TYPE_VORBIS_COMMENT) { + av_log(s->avctx, AV_LOG_DEBUG, "skiping vorbis comment\n"); + return buf_size; + } + /* check that there is at least the smallest decodable amount of data. this amount corresponds to the smallest valid FLAC frame possible. FF F8 69 02 00 00 9A 00 00 34 46 */ |