diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-04-03 17:45:46 +0400 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-04-04 01:22:11 +0400 |
commit | c351d8781dc58742b6db63cdf275395e1f646919 (patch) | |
tree | f4e8d4d7a9c7a4067c0f36039345890baf0034e9 /libavformat | |
parent | d553a522b969786c3e61350bc9a066a5237b0f52 (diff) |
Skip padding in an id3 tag in aiff files.
Fixes ticket #2430.
Reviewed-by: Matthieu Bouron
(cherry picked from commit db2d3a90825025b2f5da85792e1df33280c61391)
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/aiffdec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c index 8d466fa815..4a2629888b 100644 --- a/libavformat/aiffdec.c +++ b/libavformat/aiffdec.c @@ -192,7 +192,7 @@ static int aiff_probe(AVProbeData *p) static int aiff_read_header(AVFormatContext *s) { int ret, size, filesize; - int64_t offset = 0; + int64_t offset = 0, position; uint32_t tag; unsigned version = AIFF_C_VERSION1; AVIOContext *pb = s->pb; @@ -236,6 +236,7 @@ static int aiff_read_header(AVFormatContext *s) goto got_sound; break; case MKTAG('I', 'D', '3', ' '): + position = avio_tell(pb); ff_id3v2_read(s, ID3v2_DEFAULT_MAGIC, &id3v2_extra_meta); if (id3v2_extra_meta) if ((ret = ff_id3v2_parse_apic(s, &id3v2_extra_meta)) < 0) { @@ -243,6 +244,8 @@ static int aiff_read_header(AVFormatContext *s) return ret; } ff_id3v2_free_extra_meta(&id3v2_extra_meta); + if (position + size > avio_tell(pb)) + avio_skip(pb, position + size - avio_tell(pb)); break; case MKTAG('F', 'V', 'E', 'R'): /* Version chunk */ version = avio_rb32(pb); |