[FFmpeg-cvslog] swscale/tests: check return value of sws_scale
Lynne
git at videolan.org
Thu Jul 9 12:36:43 EEST 2020
ffmpeg | branch: master | Lynne <dev at lynne.ee> | Tue Jul 7 22:19:14 2020 +0100| [3adffab073bc59af39dddd035168ac72bc9ffde3] | committer: Lynne
swscale/tests: check return value of sws_scale
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3adffab073bc59af39dddd035168ac72bc9ffde3
---
libswscale/tests/swscale.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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);
More information about the ffmpeg-cvslog
mailing list