From a25a7624f0f9d0f520ef155cd61bbcfcde352de1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 12 Apr 2008 04:20:40 +0000 Subject: 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 --- src/inputPlugins/flac_plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3