mpc: don't assume the stream is stereo
Don't hard-code the factor "2".
This commit is contained in:
parent
8d1ffb1684
commit
0a6f4048d0
|
@ -184,8 +184,7 @@ mpc_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
|
||||||
|
|
||||||
samplePos += ret;
|
samplePos += ret;
|
||||||
|
|
||||||
/* ret is in samples, and we have stereo */
|
ret *= info.channels;
|
||||||
ret *= 2;
|
|
||||||
|
|
||||||
mpc_to_mpd_buffer(chunk, sample_buffer, ret);
|
mpc_to_mpd_buffer(chunk, sample_buffer, ret);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue