aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-08 03:13:37 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-08 03:13:37 +0200
commit3183c38aaabc6c8a1f9b8b8495a91d9b37d7b9e6 (patch)
tree1bf29172e9e46d393fa983f9161209fdda08e67d /libavcodec
parent011004152f6d92646f769d609ac841c884ff6bb3 (diff)
downloadffmpeg-3183c38aaabc6c8a1f9b8b8495a91d9b37d7b9e6.tar.gz
mp3decoder: discard ID3 tags
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpegaudiodec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 97246ac8b0..6a2b0fdd53 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -1641,6 +1641,10 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame_ptr,
return AVERROR_INVALIDDATA;
header = AV_RB32(buf);
+ if (header>>8 == AV_RB32("TAG")>>8) {
+ av_log(avctx, AV_LOG_DEBUG, "discarding ID3 tag\n");
+ return buf_size;
+ }
if (ff_mpa_check_header(header) < 0) {
av_log(avctx, AV_LOG_ERROR, "Header missing\n");
return AVERROR_INVALIDDATA;