aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-23 23:59:54 +0200
committerEric Wong <normalperson@yhbt.net>2008-09-29 01:33:40 -0700
commitcc7fbb61e13ead2b4637f28aaa0c61441aed84a2 (patch)
treef79dbbc9e438b85a2ab3be6520e191909a2171c1 /src
parentd645f0a97a52ac061d1f6a43b798c05df93fc48e (diff)
downloadmpd-cc7fbb61e13ead2b4637f28aaa0c61441aed84a2.tar.gz
mpd-cc7fbb61e13ead2b4637f28aaa0c61441aed84a2.tar.xz
mpd-cc7fbb61e13ead2b4637f28aaa0c61441aed84a2.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 'src')
-rw-r--r--src/inputPlugins/flac_plugin.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/inputPlugins/flac_plugin.c b/src/inputPlugins/flac_plugin.c
index 89e988a03..f66ca4845 100644
--- a/src/inputPlugins/flac_plugin.c
+++ b/src/inputPlugins/flac_plugin.c
@@ -271,11 +271,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;
@@ -437,10 +437,6 @@ static int flac_decode_internal(InputStream * inStream, int is_ogg)
flacPrintErroredState(flac_get_state(flacDec));
flac_finish(flacDec);
}
- /* send last little bit */
- if (data.chunk_length > 0 && !dc_intr())
- flacSendChunk(&data);
-
fail:
if (data.replayGainInfo)
freeReplayGainInfo(data.replayGainInfo);