ffv1dec: change bitstream end check to a exact check instead of a +-1 check
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 24 Sep 2012 02:58:24 +0000 (04:58 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 25 Sep 2012 01:43:23 +0000 (03:43 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/ffv1.c

index 210400b..e8fccb6 100644 (file)
@@ -1706,8 +1706,10 @@ static int decode_slice(AVCodecContext *c, void *arg){
         decode_rgb_frame(fs, planes, width, height, p->linesize);
     }
     if(fs->ac && f->version > 2) {
-        int v = fs->c.bytestream_end - fs->c.bytestream - 3 - 5*f->ec;
-        if(v != -1 && v!= 0) {
+        int v;
+        get_rac(&fs->c, (int[]){129});
+        v = fs->c.bytestream_end - fs->c.bytestream - 2 - 5*f->ec;
+        if(v) {
             av_log(f->avctx, AV_LOG_ERROR, "bytestream end mismatching by %d\n", v);
             fs->slice_damaged = 1;
         }