diff mbox series

[FFmpeg-devel,16/24] sws: simplify setting sliceDir

Message ID 20210531075515.19544-16-anton@khirnov.net
State Accepted
Commit a91e6c927e526f6a24336379148ff0e399afa852
Headers show
Series [FFmpeg-devel,01/24] sws: remove unnecessary braces | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Anton Khirnov May 31, 2021, 7:55 a.m. UTC
---
 libswscale/swscale.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer June 1, 2021, 12:32 p.m. UTC | #1
On Mon, May 31, 2021 at 09:55:07AM +0200, Anton Khirnov wrote:
> ---
>  libswscale/swscale.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

ok

thx

[...]
diff mbox series

Patch

diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 73bc0c5617..270adcc072 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -918,7 +918,7 @@  int attribute_align_arg sws_scale(struct SwsContext *c,
             return AVERROR(EINVAL);
         }
 
-        if (srcSliceY == 0) c->sliceDir = 1; else c->sliceDir = -1;
+        c->sliceDir = (srcSliceY == 0) ? 1 : -1;
     }
 
     if (usePal(c->srcFormat))