[FFmpeg-cvslog] alsdec.c: Also test 0 when checking rice decoder values.

Carl Eugen Hoyos git at videolan.org
Sat May 5 13:24:38 CEST 2012


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sat May  5 13:19:35 2012 +0200| [396d2aecc5a21779a9df57f4f472e5f1ae3188c3] | committer: Carl Eugen Hoyos

alsdec.c: Also test 0 when checking rice decoder values.

Suggested-by: Thilo Borgmann

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=396d2aecc5a21779a9df57f4f472e5f1ae3188c3
---

 libavcodec/alsdec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index 625d111..e5208fc 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -651,7 +651,7 @@ static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd)
         for (k = 1; k < sub_blocks; k++)
             s[k] = s[k - 1] + decode_rice(gb, 0);
     }
-    for (k = 1; k < sub_blocks; k++)
+    for (k = 0; k < sub_blocks; k++)
         if (s[k] > 32) {
             av_log(avctx, AV_LOG_ERROR, "k invalid for rice code.\n");
             return -1;



More information about the ffmpeg-cvslog mailing list