[vlc-commits] opengl: fix wrong visible pitch for subpictures
Thomas Guillem
git at videolan.org
Fri Jun 8 17:18:34 CEST 2018
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Jun 8 17:09:12 2018 +0200| [256c740852ae2d5256772bf70273a8ab5799ad65] | 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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=256c740852ae2d5256772bf70273a8ab5799ad65
---
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 8727a6d73e..33f738f579 100644
--- a/modules/video_output/opengl/vout_helper.c
+++ b/modules/video_output/opengl/vout_helper.c
@@ -1218,6 +1218,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