Commit 3943ba9e authored by Martin Storsjö's avatar 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: default avatarMartin Storsjö <martin@martin.st>
parent fe29bc61
...@@ -714,7 +714,7 @@ static void Upload(vout_display_opengl_t *vgl, int in_width, int in_height, ...@@ -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. // This unpack alignment is the default, but setting it just in case.
glPixelStorei(GL_UNPACK_ALIGNMENT, 4); glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
#ifndef GL_UNPACK_ROW_LENGTH #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_width = full_upload ? full_width : width;
int dst_pitch = ALIGN(dst_width * pixel_pitch, 4); int dst_pitch = ALIGN(dst_width * pixel_pitch, 4);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment