summaryrefslogtreecommitdiff
path: root/libswscale
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-02-04 00:40:42 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-02-04 01:49:38 +0100
commit61ea7f15094de9f44423017152b76c644b6ba89c (patch)
treebc968a46c872d43807d936e8bf359ae43dc6dada /libswscale
parent0711c5bfb8b496f0e4054548ec6db97d13a1d6f5 (diff)
swscale/swscale-test: Check av_image_fill_linesizes() for failure
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/swscale-test.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/libswscale/swscale-test.c b/libswscale/swscale-test.c
index b79bb2373a..4d8d08bd1a 100644
--- a/libswscale/swscale-test.c
+++ b/libswscale/swscale-test.c
@@ -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