mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
fix bug where subframe bps estimate was not taking into account wasted bits
This commit is contained in:
@@ -1039,6 +1039,7 @@ bool stream_decoder_read_subframe_(FLAC__StreamDecoder *decoder, unsigned channe
|
|||||||
if(!FLAC__bitbuffer_read_unary_unsigned(&decoder->guts->input, &u, read_callback_, decoder))
|
if(!FLAC__bitbuffer_read_unary_unsigned(&decoder->guts->input, &u, read_callback_, decoder))
|
||||||
return false; /* the read_callback_ sets the state for us */
|
return false; /* the read_callback_ sets the state for us */
|
||||||
decoder->guts->frame.subframes[channel].wasted_bits = u+1;
|
decoder->guts->frame.subframes[channel].wasted_bits = u+1;
|
||||||
|
bps -= decoder->guts->frame.subframes[channel].wasted_bits;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
decoder->guts->frame.subframes[channel].wasted_bits = 0;
|
decoder->guts->frame.subframes[channel].wasted_bits = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user