riff: always generate a proper WAVEFORMATEX structure in ff_put_wav_header
authorJohn Brooks <john.brooks@bluecherry.net>
Thu, 13 Oct 2011 08:34:20 +0000 (08:34 +0000)
committerJanne Grunau <janne-libav@jannau.net>
Fri, 14 Oct 2011 11:28:58 +0000 (13:28 +0200)
commit2c4e08d89327595f7f4be57dda4b3775e1198d5e
tree8d5ea42065bb095e6cfd854ef3cdbae4b65cbe0b
parent582f231142c62a0bd6391efbd5a2ac119d73bb40
riff: always generate a proper WAVEFORMATEX structure in ff_put_wav_header

The cbSize field should be included in all cases, even with PCM where
its value is ignored.

Fixes encoding PCM audio in Matroska for some players which insist on
a full WAVEFORMATEX structure for A_MS/ACM audio.

Since fate uses wav files for the audio test a larger number of tests
has changed checksums or shifted positions due to the 2 byte longer
wave header.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
22 files changed:
libavformat/asfenc.c
libavformat/riff.c
tests/ref/acodec/adpcm_ima_qt
tests/ref/acodec/adpcm_ima_wav
tests/ref/acodec/adpcm_ms
tests/ref/acodec/adpcm_swf
tests/ref/acodec/adpcm_yam
tests/ref/acodec/alac
tests/ref/acodec/aref
tests/ref/acodec/flac
tests/ref/acodec/g726
tests/ref/acodec/mp2
tests/ref/acodec/pcm
tests/ref/lavf/wav
tests/ref/seek/adpcm_yam_wav
tests/ref/seek/g726_wav
tests/ref/seek/lavf_wav
tests/ref/seek/pcm_alaw_wav
tests/ref/seek/pcm_mulaw_wav
tests/ref/seek/pcm_s16le_wav
tests/ref/seek/pcm_u8_wav
tests/ref/seek/pcm_zork_wav