[vlc-commits] opengl: Check whether full_width matches the pitch

Martin Storsjö git at videolan.org
Mon Apr 1 10:11:37 CEST 2013


vlc | branch: master | Martin Storsjö <martin at martin.st> | Sat Mar 30 01:48:29 2013 +0200| [3943ba9ed718304134ac8ffc82d195579e2621be] | committer: Martin Storsjö

opengl: Check whether full_width matches the pitch

This is the actual width used in the upload calls if the check
matched, so this is the width we should check for.

Signed-off-by: Martin Storsjö <martin at martin.st>

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

 modules/video_output/opengl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c
index a46fcc6..0801faa 100644
--- a/modules/video_output/opengl.c
+++ b/modules/video_output/opengl.c
@@ -714,7 +714,7 @@ static void Upload(vout_display_opengl_t *vgl, int in_width, int in_height,
     // This unpack alignment is the default, but setting it just in case.
     glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
 #ifndef GL_UNPACK_ROW_LENGTH
-    if ( pitch != ALIGN(width * pixel_pitch, 4) )
+    if ( pitch != ALIGN(full_width * pixel_pitch, 4) )
     {
         int dst_width = full_upload ? full_width : width;
         int dst_pitch = ALIGN(dst_width * pixel_pitch, 4);



More information about the vlc-commits mailing list