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

Anton Khirnov anton at khirnov.net
Mon May 31 10:55:07 EEST 2021


---
 libswscale/swscale.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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))
-- 
2.30.2



More information about the ffmpeg-devel mailing list