diff options
author | Clément Bœsch <ubitux@gmail.com> | 2011-01-10 11:36:11 +0000 |
---|---|---|
committer | Anton Khirnov <wyskas@gmail.com> | 2011-01-10 11:36:11 +0000 |
commit | c19a216af3ffc965752e600ac5fc298807d92857 (patch) | |
tree | 52f4df73bce4b07b80e0d091c8e1d31207a90382 /libavcodec | |
parent | 4da766ce6590554cdc6afd70812a62d5cba43087 (diff) | |
download | ffmpeg-c19a216af3ffc965752e600ac5fc298807d92857.tar.gz |
Handle ID3v1 tag while decoding mp[123] frames
patch by Clément Bœsch (ubitux at gmail)
Originally committed as revision 26297 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpegaudiodec.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 769be89913..76fdffbafe 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -27,6 +27,7 @@ #include "avcodec.h" #include "get_bits.h" #include "dsputil.h" +#include "libavformat/id3v1.h" /* * TODO: @@ -2043,6 +2044,13 @@ static int decode_frame(AVCodecContext * avctx, header = AV_RB32(buf); if(ff_mpa_check_header(header) < 0){ + + if (buf_size == ID3v1_TAG_SIZE + && buf[0] == 'T' && buf[1] == 'A' && buf[2] == 'G') { + *data_size = 0; + return ID3v1_TAG_SIZE; + } + av_log(avctx, AV_LOG_ERROR, "Header missing\n"); return -1; } |