[FFmpeg-cvslog] Skip padding in an id3 tag in aiff files.
Carl Eugen Hoyos
git at videolan.org
Wed Apr 3 23:29:15 CEST 2013
ffmpeg | branch: release/1.0 | Carl Eugen Hoyos <cehoyos at ag.or.at> | Wed Apr 3 15:45:46 2013 +0200| [13cf445358a19d188a745e3d217297857021e406] | committer: Carl Eugen Hoyos
Skip padding in an id3 tag in aiff files.
Fixes ticket #2430.
Reviewed-by: Matthieu Bouron
(cherry picked from commit db2d3a90825025b2f5da85792e1df33280c61391)
Conflicts:
libavformat/aiffdec.c
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=13cf445358a19d188a745e3d217297857021e406
---
libavformat/aiffdec.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index 41fe0d2..f5c7520 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -191,7 +191,7 @@ static int aiff_probe(AVProbeData *p)
static int aiff_read_header(AVFormatContext *s)
{
int size, filesize;
- int64_t offset = 0;
+ int64_t offset = 0, position;
uint32_t tag;
unsigned version = AIFF_C_VERSION1;
AVIOContext *pb = s->pb;
@@ -235,8 +235,11 @@ 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);
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);
More information about the ffmpeg-cvslog
mailing list