ffv1dec: keep track of errors in slice headers for EC
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 16 Jul 2012 13:40:39 +0000 (15:40 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 16 Jul 2012 13:48:04 +0000 (15:48 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/ffv1.c

index 4bf29f7..f03ea8e 100644 (file)
@@ -1610,8 +1610,10 @@ static int decode_slice(AVCodecContext *c, void *arg){
     if(f->version > 2){
         if(init_slice_state(f, fs) < 0)
             return AVERROR(ENOMEM);
-        if(decode_slice_header(f, fs) < 0)
+        if(decode_slice_header(f, fs) < 0) {
+            fs->slice_damaged = 1;
             return AVERROR_INVALIDDATA;
+        }
     }
     if(init_slice_state(f, fs) < 0)
         return AVERROR(ENOMEM);