Commit 47335126 authored by Michael Niedermayer's avatar Michael Niedermayer

ff_end_tag: assert that the start is aligned.

If its start is not aligned then aligning its end will
likely break many demuxers as they check the size and not
the position.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 810cd0dd
...@@ -427,6 +427,8 @@ void ff_end_tag(AVIOContext *pb, int64_t start) ...@@ -427,6 +427,8 @@ void ff_end_tag(AVIOContext *pb, int64_t start)
{ {
int64_t pos; int64_t pos;
av_assert0((start&1) == 0);
pos = avio_tell(pb); pos = avio_tell(pb);
if (pos & 1) if (pos & 1)
avio_w8(pb, 0); avio_w8(pb, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment