Fix musepack bitrate display
Thanks to Paul Seropian (paranoos) git-svn-id: https://svn.musicpd.org/mpd/trunk@3421 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
ef444e6cbe
commit
05036ef618
@ -201,6 +201,8 @@ static int mpc_decode(OutputBuffer * cb, DecoderControl * dc,
|
||||
dc->seek = 0;
|
||||
}
|
||||
|
||||
vbrUpdateAcc = 0;
|
||||
vbrUpdateBits = 0;
|
||||
ret = mpc_decoder_decode(&decoder, sample_buffer,
|
||||
&vbrUpdateAcc, &vbrUpdateBits);
|
||||
|
||||
@ -226,7 +228,7 @@ static int mpc_decode(OutputBuffer * cb, DecoderControl * dc,
|
||||
|
||||
bitRate = vbrUpdateBits *
|
||||
dc->audioFormat.sampleRate /
|
||||
(MPC_CHUNK_SIZE);
|
||||
1152 / 1000;
|
||||
|
||||
sendDataToOutputBuffer(cb, inStream, dc,
|
||||
inStream->seekable,
|
||||
@ -248,8 +250,7 @@ static int mpc_decode(OutputBuffer * cb, DecoderControl * dc,
|
||||
if(!dc->stop && chunkpos > 0) {
|
||||
time = ((float)samplePos) / dc->audioFormat.sampleRate;
|
||||
|
||||
bitRate = vbrUpdateBits * dc->audioFormat.sampleRate /
|
||||
chunkpos;
|
||||
bitRate = vbrUpdateBits * dc->audioFormat.sampleRate / 1152 / 1000;
|
||||
|
||||
sendDataToOutputBuffer(cb, NULL, dc, inStream->seekable,
|
||||
chunk, chunkpos, time, bitRate,
|
||||
|
Loading…
Reference in New Issue
Block a user