Browse Source

riff: chunks must be at 2 byte boundary

Fixes #2244.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
tags/n1.2
Paul B Mahol 12 years ago
parent
commit
810cd0dd9c
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavformat/riff.c

+ 3
- 1
libavformat/riff.c View File

@@ -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 */


Loading…
Cancel
Save