From e0706e9cc8f30a8242d2b140edace7bf76170506 Mon Sep 17 00:00:00 2001
From: foo86 <foobaz86@gmail.com>
Date: Fri, 13 May 2016 12:48:23 +0300
Subject: [PATCH] avcodec/dca: remove Rice code length limit

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/dca_xll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/dca_xll.c b/libavcodec/dca_xll.c
index 316af27b89..e43ee6aab8 100644
--- a/libavcodec/dca_xll.c
+++ b/libavcodec/dca_xll.c
@@ -32,7 +32,7 @@ static int get_linear(GetBitContext *gb, int n)
 
 static int get_rice_un(GetBitContext *gb, int k)
 {
-    unsigned int v = get_unary(gb, 1, 128);
+    unsigned int v = get_unary(gb, 1, get_bits_left(gb));
     return (v << k) | get_bits_long(gb, k);
 }