[vlc-commits] opengl: display: place the initial picture
Alexandre Janniaux
git at videolan.org
Fri Oct 23 21:37:44 CEST 2020
vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Tue Oct 13 11:33:50 2020 +0200| [2c8d3592dace77ee9c7a3ce57f5ac535a5f1922a] | committer: Alexandre Janniaux
opengl: display: place the initial picture
Otherwise, the display might never set the vlc_gl_t size and thought it
would not use uninitialized vout_display_place_t objects, it would not
initialized the OpenGL viewport and window aspect ratio either. It was
leading to OpenGL display being at incorrect size, especially on
Android, until the display size is changed, for example by rotating the
phone.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2c8d3592dace77ee9c7a3ce57f5ac535a5f1922a
---
modules/video_output/opengl/display.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules/video_output/opengl/display.c b/modules/video_output/opengl/display.c
index b4d79cf0ca..c62ab37298 100644
--- a/modules/video_output/opengl/display.c
+++ b/modules/video_output/opengl/display.c
@@ -108,7 +108,6 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
return VLC_ENOMEM;
sys->gl = NULL;
- sys->place_changed = false;
vout_window_t *surface = cfg->window;
char *gl_name = var_InheritString(surface, MODULE_VARNAME);
@@ -144,6 +143,10 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
if (sys->gl == NULL)
goto error;
+ vout_display_PlacePicture(&sys->place, vd->source, cfg);
+ sys->place_changed = true;
+ vlc_gl_Resize (sys->gl, cfg->display.width, cfg->display.height);
+
/* Initialize video display */
const vlc_fourcc_t *spu_chromas;
More information about the vlc-commits
mailing list