The k != 1 case calls show_bits(gb, k), which doesn't make sense if k is 0.
Signed-off-by: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> --- libavcodec/alac.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/alac.c b/libavcodec/alac.c index ffd2d77..9db690b 100644 --- a/libavcodec/alac.c +++ b/libavcodec/alac.c @@ -90,6 +90,8 @@ static inline unsigned int decode_scalar(GetBitContext *gb, int k, int bps) if (x > 8) { /* RICE THRESHOLD */ /* use alternative encoding */ x = get_bits_long(gb, bps); + } else if (k <= 0) { + x = 0; } else if (k != 1) { int extrabits = show_bits(gb, k); -- 2.1.4 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel