if (dstStride[i])
av_free(dst[i]);
- return res;
+ return !!res;
}
static void selfTest(const uint8_t * const ref[4], int refStride[4],
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 / 12))
+ if (res < 0 || res != H) {
+ res = -1;
goto error;
+ }
sws_freeContext(sws);
av_free(rgb_data);