aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-12 07:07:40 +0100
committerMax Kellermann <max@duempel.org>2008-11-12 07:07:40 +0100
commit0a6f4048d07f3a5485ed1a8796896fbae3a99b8c (patch)
tree2292cc5bf3ac828f3547bb6765b771768ea33668
parent8d1ffb16843696d7df6c25a3006d7536b25c3c5c (diff)
downloadmpd-0a6f4048d07f3a5485ed1a8796896fbae3a99b8c.tar.gz
mpd-0a6f4048d07f3a5485ed1a8796896fbae3a99b8c.tar.xz
mpd-0a6f4048d07f3a5485ed1a8796896fbae3a99b8c.zip
mpc: don't assume the stream is stereo
Don't hard-code the factor "2".
-rw-r--r--src/decoder/mpc_plugin.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/decoder/mpc_plugin.c b/src/decoder/mpc_plugin.c
index 34400f153..c55875a3f 100644
--- a/src/decoder/mpc_plugin.c
+++ b/src/decoder/mpc_plugin.c
@@ -184,8 +184,7 @@ mpc_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
samplePos += ret;
- /* ret is in samples, and we have stereo */
- ret *= 2;
+ ret *= info.channels;
mpc_to_mpd_buffer(chunk, sample_buffer, ret);