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
This commit is contained in:
parent
f4252ee795
commit
a25a7624f0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user