diff options
author | Max Kellermann <max@duempel.org> | 2008-09-23 23:59:54 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-23 23:59:54 +0200 |
commit | aac5f4269847e508e01ecc8b99d229185e925659 (patch) | |
tree | 4f47521416f4db7a53428717d34b729989229fdb /src | |
parent | 128d8c7c15c0713cfccc42dfeea9b0cd9ed11d14 (diff) | |
download | mpd-aac5f4269847e508e01ecc8b99d229185e925659.tar.gz mpd-aac5f4269847e508e01ecc8b99d229185e925659.tar.xz mpd-aac5f4269847e508e01ecc8b99d229185e925659.zip |
flac: assume the buffer is empty in flacWrite() II
The previous patch on this topic was incomplete: it still added
data->chunk_length when calling flac_convert(). Remove this, too.
Diffstat (limited to '')
-rw-r--r-- | src/inputPlugins/flac_plugin.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/inputPlugins/flac_plugin.c b/src/inputPlugins/flac_plugin.c index a579209e4..efa3e8355 100644 --- a/src/inputPlugins/flac_plugin.c +++ b/src/inputPlugins/flac_plugin.c @@ -268,11 +268,11 @@ static FLAC__StreamDecoderWriteStatus flacWrite(const flac_decoder *dec, num_samples = max_samples; if (num_channels == 2 && bytes_per_sample == 2) - flac_convert_stereo16(data->chunk + data->chunk_length, + flac_convert_stereo16(data->chunk, buf, c_samp, c_samp + num_samples); else - flac_convert(data->chunk + data->chunk_length, + flac_convert(data->chunk, num_channels, bytes_per_sample, buf, c_samp, c_samp + num_samples); data->chunk_length = num_samples * bytes_per_channel; @@ -434,11 +434,6 @@ static int flac_decode_internal(struct decoder * decoder, flacPrintErroredState(flac_get_state(flacDec)); flac_finish(flacDec); } - /* send last little bit */ - if (data.chunk_length > 0 && decoder_get_command(decoder) != DECODE_COMMAND_STOP) { - flacSendChunk(&data); - decoder_flush(decoder); - } fail: if (data.replayGainInfo) |