Message ID | MBf96bm--3-2@lynne.ee |
---|---|
State | Accepted |
Commit | 3adffab073bc59af39dddd035168ac72bc9ffde3 |
Headers | show |
Series | [FFmpeg-devel] swscale/tests: check return value of sws_scale | expand |
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
On Tue, 7 Jul 2020, Lynne wrote: > Patch attached. > From a89bfd810cf40e3005fbcbdcf43a7b858b4dd12c Mon Sep 17 00:00:00 2001 > From: Lynne <dev@lynne.ee> > Date: Tue, 7 Jul 2020 22:19:14 +0100 > Subject: [PATCH] swscale/tests: check return value of sws_scale > > --- > 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; This looks good to me. Unfortunately (for me, for fixing the arm side of it), I noticed that the full test takes a tremendous amount of time to run and isn't part of the normal fate run, but I do see that there's options for reducing the number of cases tested, that should allow me to test the arm side. // Martin
On Tue, Jul 07, 2020 at 11:22:20PM +0200, Lynne wrote: > Patch attached. > > swscale.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > e4eb17aee95423afb258e2368ac1503720393263 0001-swscale-tests-check-return-value-of-sws_scale.patch > From a89bfd810cf40e3005fbcbdcf43a7b858b4dd12c Mon Sep 17 00:00:00 2001 > From: Lynne <dev@lynne.ee> > Date: Tue, 7 Jul 2020 22:19:14 +0100 > Subject: [PATCH] swscale/tests: check return value of sws_scale > > --- > 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)) if iam not mistaken, this should be res != H, not /12 thx [...]
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);