diff options
author | Lynne <dev@lynne.ee> | 2020-07-07 22:19:14 +0100 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2020-07-09 10:33:19 +0100 |
commit | 3adffab073bc59af39dddd035168ac72bc9ffde3 (patch) | |
tree | 065adb133aff343b0eabc643dda8dbd51f24bc0c /libswscale | |
parent | 3e098cca6e51db0f19928c12d0348deaa17137b3 (diff) | |
download | ffmpeg-3adffab073bc59af39dddd035168ac72bc9ffde3.tar.gz |
swscale/tests: check return value of sws_scale
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/tests/swscale.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libswscale/tests/swscale.c b/libswscale/tests/swscale.c index 19878a7877..693f439bf5 100644 --- a/libswscale/tests/swscale.c +++ b/libswscale/tests/swscale.c @@ -422,7 +422,9 @@ bad_option: for (y = 0; y < H; y++) for (x = 0; x < W * 4; x++) rgb_data[ x + y * 4 * W] = av_lfg_get(&rand); - sws_scale(sws, rgb_src, rgb_stride, 0, H / 12, (uint8_t * const *) src, stride); + res = sws_scale(sws, rgb_src, rgb_stride, 0, H / 12, (uint8_t * const *) src, stride); + if (res < 0 || res != (H / 12)) + goto error; sws_freeContext(sws); av_free(rgb_data); |