ffv1enc: propagate error code from write_extradata()
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 16 Aug 2013 23:38:53 +0000 (01:38 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 16 Aug 2013 23:43:30 +0000 (01:43 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/ffv1enc.c

index bb7e087..82ed577 100644 (file)
@@ -904,7 +904,8 @@ static av_cold int encode_init(AVCodecContext *avctx)
                avctx->slices);
         return AVERROR(ENOSYS);
 slices_ok:
-        write_extradata(s);
+        if ((ret = write_extradata(s)) < 0)
+            return ret;
     }
 
     if ((ret = ffv1_init_slice_contexts(s)) < 0)