From 361b1b86763fdede33defccf4d7e122466e62020 Mon Sep 17 00:00:00 2001 From: Brian Becker Date: Wed, 10 Mar 2004 03:54:56 +0000 Subject: [PATCH] Correcting the header size for ADPCM_IMA_WAV files patch by (Brian Becker ) Originally committed as revision 2867 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/wav.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/wav.c b/libavformat/wav.c index 787c7d542f..1beb7359da 100644 --- a/libavformat/wav.c +++ b/libavformat/wav.c @@ -102,6 +102,7 @@ int put_wav_header(ByteIOContext *pb, AVCodecContext *enc) put_le32(pb, 0); /* dwPTSHigh */ } else if (enc->codec_id == CODEC_ID_ADPCM_IMA_WAV) { put_le16(pb, 2); /* wav_extra_size */ + hdrsize += 2; put_le16(pb, ((enc->block_align - 4 * enc->channels) / (4 * enc->channels)) * 8 + 1); /* wSamplesPerBlock */ } else put_le16(pb, 0); /* wav_extra_size */