[xiph-commits] r12220 - trunk/vorbis-tools/ogg123
conrad at svn.xiph.org
conrad at svn.xiph.org
Sat Dec 16 22:56:23 PST 2006
Author: conrad
Date: 2006-12-16 22:56:20 -0800 (Sat, 16 Dec 2006)
New Revision: 12220
Modified:
trunk/vorbis-tools/ogg123/flac_format.c
Log:
apply patch from mikulas from ticket:535 "Ogg123 crashes when playing
1-channel flac files". Verified the problem with some mono flac files, and
this patch fixes it. Closes ticket:535
Modified: trunk/vorbis-tools/ogg123/flac_format.c
===================================================================
--- trunk/vorbis-tools/ogg123/flac_format.c 2006-12-17 05:57:35 UTC (rev 12219)
+++ trunk/vorbis-tools/ogg123/flac_format.c 2006-12-17 06:56:20 UTC (rev 12220)
@@ -288,11 +288,11 @@
if (audio_fmt->word_size == 1) {
for (i = 0; i < priv->channels; i++)
for (j = 0; j < copy; j++)
- buf8[(j+realsamples)*2+i] = (FLAC__int8) (0xFF & priv->buf[i][j+priv->buf_start]);
+ buf8[(j+realsamples)*audio_fmt->channels+i] = (FLAC__int8) (0xFF & priv->buf[i][j+priv->buf_start]);
} else if (audio_fmt->word_size == 2) {
for (i = 0; i < priv->channels; i++)
for (j = 0; j < copy; j++)
- buf16[(j+realsamples)*2+i] = (FLAC__int16) (0xFFFF & priv->buf[i][j+priv->buf_start]);
+ buf16[(j+realsamples)*audio_fmt->channels+i] = (FLAC__int16) (0xFFFF & priv->buf[i][j+priv->buf_start]);
}
priv->buf_start += copy;
More information about the commits
mailing list