summaryrefslogtreecommitdiff
path: root/libavcodec/alsdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/alsdec.c')
-rw-r--r--libavcodec/alsdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index 064e143f74..ac4a1f86a3 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -380,7 +380,7 @@ static void parse_bs_info(const uint32_t bs_info, unsigned int n,
*/
static int32_t decode_rice(GetBitContext *gb, unsigned int k)
{
- int max = gb->size_in_bits - get_bits_count(gb) - k;
+ int max = get_bits_left(gb) - k;
int q = get_unary(gb, 0, max);
int r = k ? get_bits1(gb) : !(q & 1);