Commit 9e3436ab authored by Michael Smith's avatar Michael Smith

Tolerate incorrect block alignment values in wav headers. Apparently mplayer's

wav output is busted. Big surprise. Now it's just a warning, should fix bug #671

svn path=/trunk/vorbis-tools/; revision=10169
parent bd82f21c
......@@ -430,10 +430,16 @@ int wav_open(FILE *in, oe_enc_opt *opt, unsigned char *oldbuf, int buflen)
return 0;
}
if(format.align != format.channels * samplesize) {
/* This is incorrect according to the spec. Warn loudly, then ignore
* this value.
*/
fprintf(stderr, _("Warning: WAV 'block alignment' value is incorrect, "
"ignoring.\n"
"The software that created this file is incorrect.\n"));
}
if( format.align == format.channels*samplesize &&
format.samplesize == samplesize*8 &&
if(format.samplesize == samplesize*8 &&
(format.samplesize == 24 || format.samplesize == 16 ||
format.samplesize == 8 ||
(format.samplesize == 32 && format.format == 3)))
......
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