[vlc-commits] opengl: use vlc_align helper

Marvin Scholz git at videolan.org
Tue Mar 24 19:20:35 CET 2020


vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Tue Mar 24 13:34:46 2020 +0100| [f83d18d4cef82c33f696877bc2fb7e9ed351f824] | committer: Marvin Scholz

opengl: use vlc_align helper

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

 modules/video_output/opengl/interop_sw.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/modules/video_output/opengl/interop_sw.c b/modules/video_output/opengl/interop_sw.c
index b872f511eb..a553f4f2b4 100644
--- a/modules/video_output/opengl/interop_sw.c
+++ b/modules/video_output/opengl/interop_sw.c
@@ -220,9 +220,7 @@ upload_plane(const struct vlc_gl_interop *interop, unsigned tex_idx,
     {
         if (pitch != visible_pitch)
         {
-#define ALIGN(x, y) (((x) + ((y) - 1)) & ~((y) - 1))
-            visible_pitch = ALIGN(visible_pitch, 4);
-#undef ALIGN
+            visible_pitch = vlc_align(visible_pitch, 4);
             size_t buf_size = visible_pitch * height;
             const uint8_t *source = pixels;
             uint8_t *destination;



More information about the vlc-commits mailing list