diff mbox series

[FFmpeg-devel,1/2] swscale/tests/swscale: Fix incorrect return code check

Message ID 20200711220031.547-1-michael@niedermayer.cc
State Accepted
Commit ec27c1827c1ff6ef8b543966206d8e6a9507532b
Headers show
Series [FFmpeg-devel,1/2] swscale/tests/swscale: Fix incorrect return code check | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Michael Niedermayer July 11, 2020, 10 p.m. UTC
Regression since: 3adffab073bc59af39dddd035168ac72bc9ffde3

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libswscale/tests/swscale.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Martin Storsjö July 14, 2020, 7:42 a.m. UTC | #1
On Sun, 12 Jul 2020, Michael Niedermayer wrote:

> Regression since: 3adffab073bc59af39dddd035168ac72bc9ffde3
>
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
> libswscale/tests/swscale.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libswscale/tests/swscale.c b/libswscale/tests/swscale.c
> index 693f439bf5..58870fdb78 100644
> --- a/libswscale/tests/swscale.c
> +++ b/libswscale/tests/swscale.c
> @@ -423,7 +423,7 @@ 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 / 12))
> +    if (res < 0 || res != H)
>         goto error;

LGTM, this seems to fix the test on both aarch64 and x86.

// Martin
Michael Niedermayer July 14, 2020, 7:54 p.m. UTC | #2
On Tue, Jul 14, 2020 at 10:42:24AM +0300, Martin Storsjö wrote:
> On Sun, 12 Jul 2020, Michael Niedermayer wrote:
> 
> > Regression since: 3adffab073bc59af39dddd035168ac72bc9ffde3
> > 
> > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> > ---
> > libswscale/tests/swscale.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/libswscale/tests/swscale.c b/libswscale/tests/swscale.c
> > index 693f439bf5..58870fdb78 100644
> > --- a/libswscale/tests/swscale.c
> > +++ b/libswscale/tests/swscale.c
> > @@ -423,7 +423,7 @@ 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 / 12))
> > +    if (res < 0 || res != H)
> >         goto error;
> 
> LGTM, this seems to fix the test on both aarch64 and x86.

will apply

thx

[...]
diff mbox series

Patch

diff --git a/libswscale/tests/swscale.c b/libswscale/tests/swscale.c
index 693f439bf5..58870fdb78 100644
--- a/libswscale/tests/swscale.c
+++ b/libswscale/tests/swscale.c
@@ -423,7 +423,7 @@  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 / 12))
+    if (res < 0 || res != H)
         goto error;
     sws_freeContext(sws);
     av_free(rgb_data);