From: Josh Coalson Date: Thu, 29 Mar 2001 22:17:52 +0000 (+0000) Subject: fix bug where subframe bps estimate was not taking into account wasted bits X-Git-Tag: 1.2.0~2532 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2cf7d007a257c4d586f6fef1810c32385ce502a3;p=platform%2Fupstream%2Fflac.git fix bug where subframe bps estimate was not taking into account wasted bits --- diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c index 578d1c5..91327fa 100644 --- a/src/libFLAC/stream_decoder.c +++ b/src/libFLAC/stream_decoder.c @@ -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)) return false; /* the read_callback_ sets the state for us */ decoder->guts->frame.subframes[channel].wasted_bits = u+1; + bps -= decoder->guts->frame.subframes[channel].wasted_bits; } else decoder->guts->frame.subframes[channel].wasted_bits = 0;