[FFmpeg-cvslog] riff: chunks must be at 2 byte boundary
Paul B Mahol
git at videolan.org
Fri Feb 8 11:45:47 CET 2013
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Feb 7 10:00:40 2013 +0000| [810cd0dd9c0350b2a108a73a8ec2f4f1919c4a27] | committer: Paul B Mahol
riff: chunks must be at 2 byte boundary
Fixes #2244.
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=810cd0dd9c0350b2a108a73a8ec2f4f1919c4a27
---
libavformat/riff.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/riff.c b/libavformat/riff.c
index 0df5c8c..352bb56 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 */
More information about the ffmpeg-cvslog
mailing list