[FFmpeg-cvslog] sws: simplify setting sliceDir

Anton Khirnov git at videolan.org
Sat Jul 3 17:20:30 EEST 2021


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Thu May 20 17:03:18 2021 +0200| [a91e6c927e526f6a24336379148ff0e399afa852] | committer: Anton Khirnov

sws: simplify setting sliceDir

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a91e6c927e526f6a24336379148ff0e399afa852
---

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

diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 62a172d4ec..05544ea9fb 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))



More information about the ffmpeg-cvslog mailing list