diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-02-07 10:00:40 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2013-02-08 10:40:41 +0000 |
commit | 810cd0dd9c0350b2a108a73a8ec2f4f1919c4a27 (patch) | |
tree | e0e9ed00725725b3b7c124eb22a0bd14bdcd1511 | |
parent | 0d194ee51ed477f843900e657a7edbcbecdffa42 (diff) | |
download | ffmpeg-810cd0dd9c0350b2a108a73a8ec2f4f1919c4a27.tar.gz |
riff: chunks must be at 2 byte boundary
Fixes #2244.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r-- | libavformat/riff.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/riff.c b/libavformat/riff.c index 0df5c8c7e3..352bb561e9 100644 --- a/libavformat/riff.c +++ b/libavformat/riff.c @@ -428,9 +428,11 @@ void ff_end_tag(AVIOContext *pb, int64_t start) int64_t pos; pos = avio_tell(pb); + if (pos & 1) + avio_w8(pb, 0); avio_seek(pb, start - 4, SEEK_SET); avio_wl32(pb, (uint32_t)(pos - start)); - avio_seek(pb, pos, SEEK_SET); + avio_seek(pb, FFALIGN(pos, 2), SEEK_SET); } /* WAVEFORMATEX header */ |