[xiph-commits] r10169 - trunk/vorbis-tools/oggenc
msmith at svn.xiph.org
msmith at svn.xiph.org
Mon Oct 17 04:44:50 PDT 2005
Author: msmith
Date: 2005-10-17 04:44:48 -0700 (Mon, 17 Oct 2005)
New Revision: 10169
Modified:
trunk/vorbis-tools/oggenc/audio.c
Log:
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
Modified: trunk/vorbis-tools/oggenc/audio.c
===================================================================
--- trunk/vorbis-tools/oggenc/audio.c 2005-10-17 05:03:57 UTC (rev 10168)
+++ trunk/vorbis-tools/oggenc/audio.c 2005-10-17 11:44:48 UTC (rev 10169)
@@ -430,10 +430,16 @@
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)))
More information about the commits
mailing list