[vlc-commits] opengl: fix wrong visible pitch for subpictures
Thomas Guillem
git at videolan.org
Tue Jun 12 08:09:58 CEST 2018
vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Jun 8 17:09:12 2018 +0200| [700b2910c0b2da3741d2124119ff19437bd5f428] | committer: Thomas Guillem
opengl: fix wrong visible pitch for subpictures
The i_visible_pitch is used to calculate GL_UNPACK_ROW_LENGTH and need to
correspond to the region one since textures are allocated from it.
(cherry picked from commit 256c740852ae2d5256772bf70273a8ab5799ad65)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=700b2910c0b2da3741d2124119ff19437bd5f428
---
modules/video_output/opengl/vout_helper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c
index 6c664b3f38..4ff70adce9 100644
--- a/modules/video_output/opengl/vout_helper.c
+++ b/modules/video_output/opengl/vout_helper.c
@@ -1220,6 +1220,9 @@ int vout_display_opengl_Prepare(vout_display_opengl_t *vgl,
if (ret != VLC_SUCCESS)
continue;
}
+ /* Use the visible pitch of the region */
+ r->p_picture->p[0].i_visible_pitch = r->fmt.i_visible_width
+ * r->p_picture->p[0].i_pixel_pitch;
ret = tc->pf_update(tc, &glr->texture, &glr->width, &glr->height,
r->p_picture, &pixels_offset);
}
More information about the vlc-commits
mailing list