[vlc-commits] gl: pass display size rather than 1x1
Rémi Denis-Courmont
git at videolan.org
Thu Jan 31 19:00:04 CET 2019
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jan 31 19:31:18 2019 +0200| [a4da83810639b35bc4cce72d52c21e6d1ec76e27] | committer: Rémi Denis-Courmont
gl: pass display size rather than 1x1
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a4da83810639b35bc4cce72d52c21e6d1ec76e27
---
src/video_output/opengl.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/video_output/opengl.c b/src/video_output/opengl.c
index d2a296ce93..61dfdc4f67 100644
--- a/src/video_output/opengl.c
+++ b/src/video_output/opengl.c
@@ -84,7 +84,7 @@ vlc_gl_t *vlc_gl_Create(const struct vout_display_cfg *restrict cfg,
gl->surface = wnd;
/* Resize() should be called with the proper size before Swap() */
gl->module = vlc_module_load(gl, type, name, true, vlc_gl_start, gl,
- 1u, 1u);
+ cfg->display.width, cfg->display.height);
if (gl->module == NULL)
{
vlc_object_release(gl);
@@ -168,7 +168,10 @@ vlc_gl_t *vlc_gl_surface_Create(vlc_object_t *obj,
*wp = surface;
/* TODO: support ES? */
- struct vout_display_cfg dcfg = { .window = surface };
+ struct vout_display_cfg dcfg = {
+ .window = surface,
+ .display = { .width = cfg->width, cfg->height },
+ };
vlc_gl_t *gl = vlc_gl_Create(&dcfg, VLC_OPENGL, NULL);
if (gl == NULL) {
More information about the vlc-commits
mailing list