changeset 475:6ccc48e4c41b libavcodec

run1 can be <0 bugfix (found by fabrice)
author michaelni
date Tue, 04 Jun 2002 18:35:31 +0000
parents 11dbd00682fc
children ec13b0a726c3
files h263.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/h263.c	Tue Jun 04 12:58:40 2002 +0000
+++ b/h263.c	Tue Jun 04 18:35:31 2002 +0000
@@ -2704,7 +2704,7 @@
     if (sign)
         val = -val;
     val += pred;
-    
+
     /* modulo decoding */
     if (!s->h263_long_vectors) {
         l = (1 << (f_code - 1)) * 32;
@@ -2966,7 +2966,7 @@
                                 fprintf(stderr, "illegal 3. esc, esc 1 encoding possible\n");
                                 return DECODING_AC_LOST;
                             }
-                            if(abs_level <= rl->max_level[last][run1]){
+                            if(run1 >= 0 && abs_level <= rl->max_level[last][run1]){
                                 fprintf(stderr, "illegal 3. esc, esc 2 encoding possible\n");
                                 return DECODING_AC_LOST;
                             }