diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/decoder/plugins/MpcdecDecoderPlugin.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/decoder/plugins/MpcdecDecoderPlugin.cxx b/src/decoder/plugins/MpcdecDecoderPlugin.cxx index 4be9e1498..e1ddd05f0 100644 --- a/src/decoder/plugins/MpcdecDecoderPlugin.cxx +++ b/src/decoder/plugins/MpcdecDecoderPlugin.cxx @@ -193,8 +193,6 @@ mpcdec_decode(Decoder &mpd_decoder, InputStream &is) decoder_seek_error(mpd_decoder); } - mpc_uint32_t vbr_update_bits = 0; - MPC_SAMPLE_FORMAT sample_buffer[MPC_DECODER_BUFFER_LENGTH]; mpc_frame_info frame; frame.buffer = (MPC_SAMPLE_FORMAT *)sample_buffer; @@ -214,8 +212,8 @@ mpcdec_decode(Decoder &mpd_decoder, InputStream &is) MpcdecSampleTraits::value_type chunk[ARRAY_SIZE(sample_buffer)]; mpc_to_mpd_buffer(chunk, sample_buffer, ret); - long bit_rate = vbr_update_bits * audio_format.sample_rate - / 1152 / 1000; + long bit_rate = unsigned(frame.bits) * audio_format.sample_rate + / (1000 * frame.samples); cmd = decoder_data(mpd_decoder, is, chunk, ret * sizeof(chunk[0]), |