changeset 482:1a4d5101a224 libavcodec

fixed case where abs_level > MAX_LEVEL
author bellard
date Thu, 06 Jun 2002 14:25:44 +0000
parents 29a7e17d19dd
children 97da217aed7f
files h263.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/h263.c	Wed Jun 05 23:43:56 2002 +0000
+++ b/h263.c	Thu Jun 06 14:25:44 2002 +0000
@@ -2956,7 +2956,7 @@
 #if 1 
                     {
                         const int abs_level= ABS(level);
-                        const int run1= run - rl->max_run[last][abs_level] - 1;
+                        int run1;
                         if(abs_level<=MAX_LEVEL && run<=MAX_RUN && s->error_resilience>=0){
                             if(abs_level <= rl->max_level[last][run]){
                                 fprintf(stderr, "illegal 3. esc, vlc encoding possible\n");
@@ -2966,6 +2966,7 @@
                                 fprintf(stderr, "illegal 3. esc, esc 1 encoding possible\n");
                                 return DECODING_AC_LOST;
                             }
+                            run1 = run - rl->max_run[last][abs_level] - 1;
                             if(run1 >= 0 && abs_level <= rl->max_level[last][run1]){
                                 fprintf(stderr, "illegal 3. esc, esc 2 encoding possible\n");
                                 return DECODING_AC_LOST;