# HG changeset patch # User bellard # Date 1023373544 0 # Node ID 1a4d5101a224d5c7fe8170bbd2bb430808953f99 # Parent 29a7e17d19ddeab0db7261821fa37f9a44885c52 fixed case where abs_level > MAX_LEVEL diff -r 29a7e17d19dd -r 1a4d5101a224 h263.c --- 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;