[vlc-commits] opengl: fix temporary buf visible_pitch alignment
Thomas Guillem
git at videolan.org
Wed Apr 18 16:17:39 CEST 2018
vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Apr 18 16:13:57 2018 +0200| [43ec2d3924609fdde82765d5ed672aee253ecf35] | committer: Thomas Guillem
opengl: fix temporary buf visible_pitch alignment
This commit fixes a regression from 22776daa29914cf56c346241f89682d5707ffef7
(cherry picked from commit 7f2cc34ce2def321ae6c08475150ccdacbc16d6a)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=43ec2d3924609fdde82765d5ed672aee253ecf35
---
modules/video_output/opengl/converter_sw.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules/video_output/opengl/converter_sw.c b/modules/video_output/opengl/converter_sw.c
index 977fe8a48f..cb70b723ed 100644
--- a/modules/video_output/opengl/converter_sw.c
+++ b/modules/video_output/opengl/converter_sw.c
@@ -454,6 +454,9 @@ upload_plane(const opengl_tex_converter_t *tc, unsigned tex_idx,
{
if (pitch != visible_pitch)
{
+#define ALIGN(x, y) (((x) + ((y) - 1)) & ~((y) - 1))
+ visible_pitch = ALIGN(visible_pitch, 4);
+#undef ALIGN
size_t buf_size = visible_pitch * height;
const uint8_t *source = pixels;
uint8_t *destination;
More information about the vlc-commits
mailing list