swscale/swscale-test: Check av_image_fill_linesizes() for failure
authorMichael Niedermayer <michael@niedermayer.cc>
Wed, 3 Feb 2016 23:40:42 +0000 (00:40 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 4 Feb 2016 00:49:38 +0000 (01:49 +0100)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libswscale/swscale-test.c

index b79bb23..4d8d08b 100644 (file)
@@ -106,7 +106,11 @@ static int doTest(uint8_t *ref[4], int refStride[4], int w, int h,
         for (p = 0; p < 4; p++)
             av_freep(&src[p]);
 
-        av_image_fill_linesizes(srcStride, srcFormat, srcW);
+        res = av_image_fill_linesizes(srcStride, srcFormat, srcW);
+        if (res < 0) {
+            fprintf(stderr, "av_image_fill_linesizes failed\n");
+            goto end;
+        }
         for (p = 0; p < 4; p++) {
             srcStride[p] = FFALIGN(srcStride[p], 16);
             if (srcStride[p])
@@ -134,7 +138,12 @@ static int doTest(uint8_t *ref[4], int refStride[4], int w, int h,
         cur_srcH      = srcH;
     }
 
-    av_image_fill_linesizes(dstStride, dstFormat, dstW);
+    res = av_image_fill_linesizes(dstStride, dstFormat, dstW);
+    if (res < 0) {
+        fprintf(stderr, "av_image_fill_linesizes failed\n");
+        goto end;
+    }
+
     for (i = 0; i < 4; i++) {
         /* Image buffers passed into libswscale can be allocated any way you
          * prefer, as long as they're aligned enough for the architecture, and