Commit a25a7624 authored by Max Kellermann's avatar Max Kellermann Committed by Eric Wong

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
parent f4252ee7
......@@ -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
......
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