Browse code

fraps: check overread per sample instead of per line

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2011/11/10 03:40:59
Showing 1 changed files
... ...
@@ -112,12 +112,12 @@ static int fraps2_decode_plane(FrapsContext *s, uint8_t *dst, int stride, int w,
112 112
              */
113 113
             if(j) dst[i] += dst[i - stride];
114 114
             else if(Uoff) dst[i] += 0x80;
115
+            if(get_bits_left(&gb) < 0){
116
+                free_vlc(&vlc);
117
+                return -1;
118
+            }
115 119
         }
116 120
         dst += stride;
117
-        if(get_bits_left(&gb) < 0){
118
-            free_vlc(&vlc);
119
-            return -1;
120
-        }
121 121
     }
122 122
     free_vlc(&vlc);
123 123
     return 0;