swscale/tests/swscale: Initialize res to a non random error code
Regression since: 3adffab073
-1 is consistent what other error paths return
Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@ -423,8 +423,10 @@ bad_option:
|
|||||||
for (x = 0; x < W * 4; x++)
|
for (x = 0; x < W * 4; x++)
|
||||||
rgb_data[ x + y * 4 * W] = av_lfg_get(&rand);
|
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);
|
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;
|
goto error;
|
||||||
|
}
|
||||||
sws_freeContext(sws);
|
sws_freeContext(sws);
|
||||||
av_free(rgb_data);
|
av_free(rgb_data);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user