aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2016-08-08 21:06:03 +0200
committerDiego Biurrun <diego@biurrun.de>2016-08-10 11:58:38 +0200
commit0638b99cdba52554691fc668d9e477bc184c7a33 (patch)
tree4ee650166b1080824eabb7faf23f5e90782075ba /libavformat
parent0df4801105d84883071b0978cb3afc7cd5184ce8 (diff)
downloadffmpeg-0638b99cdba52554691fc668d9e477bc184c7a33.tar.gz
aiff: Skip padding byte for odd-sized chunks
Bug-Id: 660
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/aiffdec.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index e56390937e..3c45c61b1a 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -267,10 +267,14 @@ static int aiff_read_header(AVFormatContext *s)
avio_read(pb, st->codecpar->extradata, size);
break;
default: /* Jump */
- if (size & 1) /* Always even aligned */
- size++;
avio_skip(pb, size);
}
+
+ /* Skip required padding byte for odd-sized chunks. */
+ if (size & 1) {
+ filesize--;
+ avio_skip(pb, 1);
+ }
}
got_sound: