[FFmpeg-devel] [PATCH] riff: chunks must be at 2 byte boundary
Paul B Mahol
onemda at gmail.com
Thu Feb 7 11:04:43 CET 2013
Fixes #2244.
Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
libavformat/riff.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/riff.c b/libavformat/riff.c
index 0df5c8c..3011f8d 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -428,9 +428,10 @@ void ff_end_tag(AVIOContext *pb, int64_t start)
int64_t pos;
pos = avio_tell(pb);
+ ffio_fill(pb, 0, pos & 1);
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 */
--
1.7.11.4
More information about the ffmpeg-devel
mailing list