From 2c4e08d89327595f7f4be57dda4b3775e1198d5e Mon Sep 17 00:00:00 2001 From: John Brooks Date: Thu, 13 Oct 2011 08:34:20 +0000 Subject: 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 --- libavformat/asfenc.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'libavformat/asfenc.c') diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c index cbd9cb6a49..01f98d2a6f 100644 --- a/libavformat/asfenc.c +++ b/libavformat/asfenc.c @@ -434,10 +434,6 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data if (enc->codec_type == AVMEDIA_TYPE_AUDIO) { /* WAVEFORMATEX header */ int wavsize = ff_put_wav_header(pb, enc); - if ((enc->codec_id != CODEC_ID_MP3) && (enc->codec_id != CODEC_ID_MP2) && (enc->codec_id != CODEC_ID_ADPCM_IMA_WAV) && (enc->extradata_size==0)) { - wavsize += 2; - avio_wl16(pb, 0); - } if (wavsize < 0) return -1; -- cgit v1.2.3