diff --git a/src/add-ons/media/plugins/speex/speexCodecPlugin.cpp b/src/add-ons/media/plugins/speex/speexCodecPlugin.cpp index 4ae25c048c..76d51801e2 100644 --- a/src/add-ons/media/plugins/speex/speexCodecPlugin.cpp +++ b/src/add-ons/media/plugins/speex/speexCodecPlugin.cpp @@ -290,7 +290,7 @@ SpeexDecoder::Decode(void *buffer, int64 *frameCount, break; } if (fHeader->nb_channels == 2) { - speex_decode_stereo((float*)out_buffer, fSpeexOutputLength, fStereoState); + speex_decode_stereo((float*)out_buffer, fHeader->frame_size, fStereoState); } for (int i = 0 ; i < fSpeexOutputLength/fFrameSize ; i++) { *((float*)out_buffer) /= 32000;