summaryrefslogtreecommitdiff
path: root/libswscale
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-07-11 23:57:41 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-14 22:05:02 +0200
commit24c575e0aa6b469eeaa1bd8f7ffc0fe6732495d0 (patch)
treecb98372fb6cdc5a7f37bc73c901f09a2c2531629 /libswscale
parentec27c1827c1ff6ef8b543966206d8e6a9507532b (diff)
downloadffmpeg-24c575e0aa6b469eeaa1bd8f7ffc0fe6732495d0.tar.gz
swscale/tests/swscale: Initialize res to a non random error code
Regression since: 3adffab073bc59af39dddd035168ac72bc9ffde3 -1 is consistent what other error paths return Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/tests/swscale.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libswscale/tests/swscale.c b/libswscale/tests/swscale.c
index 58870fdb78..845ced61bb 100644
--- a/libswscale/tests/swscale.c
+++ b/libswscale/tests/swscale.c
@@ -423,8 +423,10 @@ bad_option:
for (x = 0; x < W * 4; x++)
rgb_data[ x + y * 4 * W] = av_lfg_get(&rand);
res = sws_scale(sws, rgb_src, rgb_stride, 0, H / 12, (uint8_t * const *) src, stride);
- if (res < 0 || res != H)
+ if (res < 0 || res != H) {
+ res = -1;
goto error;
+ }
sws_freeContext(sws);
av_free(rgb_data);