From 849172882c117fad2b649ae6207f010735a9f2de Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sat, 5 May 2012 13:14:36 +0200 Subject: [PATCH] alsdec.c: Simplify error check before calling rice decoder. Reviewed-by: Thilo Borgmann --- libavcodec/alsdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index 20ef40774e..625d111c05 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -652,7 +652,7 @@ static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd) s[k] = s[k - 1] + decode_rice(gb, 0); } for (k = 1; k < sub_blocks; k++) - if (s[k] < 0 || s[k] > 32) { + if (s[k] > 32) { av_log(avctx, AV_LOG_ERROR, "k invalid for rice code.\n"); return -1; }