Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Bouron <matthieu.bouron@gmail.com>2017-03-17 15:31:03 +0300
committerMatthieu Bouron <matthieu.bouron@gmail.com>2017-03-17 15:31:03 +0300
commite2adbcbd97de1595b26a116ca22475b6f9acdf07 (patch)
tree26f778b8168f8a0a2059897da07fbf6cd2a12c51 /libavformat/aiffdec.c
parent205b8fd078e50aa3f7f401646dbb73de1bb35a10 (diff)
parent0638b99cdba52554691fc668d9e477bc184c7a33 (diff)
Merge commit '0638b99cdba52554691fc668d9e477bc184c7a33'
* commit '0638b99cdba52554691fc668d9e477bc184c7a33': aiff: Skip padding byte for odd-sized chunks Also removes to odd-size checks from get_aiff_header and get_meta to use the generic path introduced by the original commit. Merged-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Diffstat (limited to 'libavformat/aiffdec.c')
-rw-r--r--libavformat/aiffdec.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index 9e7a39c4ed..3bbe4a07bd 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -330,10 +330,14 @@ static int aiff_read_header(AVFormatContext *s)
if (offset > 0 && st->codecpar->block_align) // COMM && SSND
goto got_sound;
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: