aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/flac_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-04-12 04:20:40 +0000
committerEric Wong <normalperson@yhbt.net>2008-04-12 04:20:40 +0000
commita25a7624f0f9d0f520ef155cd61bbcfcde352de1 (patch)
tree22c75f685b9b2acf87743f5270263115fbe30666 /src/inputPlugins/flac_plugin.c
parentf4252ee795c330484b3be1f299c593c052a270be (diff)
downloadmpd-a25a7624f0f9d0f520ef155cd61bbcfcde352de1.tar.gz
mpd-a25a7624f0f9d0f520ef155cd61bbcfcde352de1.tar.xz
mpd-a25a7624f0f9d0f520ef155cd61bbcfcde352de1.zip
multiply num_samples with bytes_per_channel
The patch "convert blocks until the buffer is full" did not update data->chunk_length correctly: it added the number of samples, not the number of bytes. Multiply that with bytes_per_channel git-svn-id: https://svn.musicpd.org/mpd/trunk@7332 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/inputPlugins/flac_plugin.c')
-rw-r--r--src/inputPlugins/flac_plugin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/inputPlugins/flac_plugin.c b/src/inputPlugins/flac_plugin.c
index 75dc6aa2d..0faee293c 100644
--- a/src/inputPlugins/flac_plugin.c
+++ b/src/inputPlugins/flac_plugin.c
@@ -286,7 +286,7 @@ static FLAC__StreamDecoderWriteStatus flacWrite(const flac_decoder *dec,
flac_convert(data->chunk + data->chunk_length,
num_channels, bytes_per_sample, buf,
c_samp, c_samp + num_samples);
- data->chunk_length = num_samples;
+ data->chunk_length = num_samples * bytes_per_channel;
if (flacSendChunk(data) < 0) {
return