From 0a6f4048d07f3a5485ed1a8796896fbae3a99b8c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 12 Nov 2008 07:07:40 +0100 Subject: [PATCH] mpc: don't assume the stream is stereo Don't hard-code the factor "2". --- src/decoder/mpc_plugin.c | 3 +-- 1 file changed, 1 insertion(+), 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);