[vlc-commits] [Git][videolan/vlc][master] opengl: fix decoder device leak
Hugo Beauzée-Luyssen (@chouquette)
gitlab at videolan.org
Thu Sep 16 07:41:39 UTC 2021
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC
Commits:
f483bdc9 by Alexandre Janniaux at 2021-09-16T07:28:54+00:00
opengl: fix decoder device leak
The decoder device was setup for offscreen surface but not for usual
surfaces, and was hold but never released.
- - - - -
1 changed file:
- src/video_output/opengl.c
Changes:
=====================================
src/video_output/opengl.c
=====================================
@@ -83,6 +83,7 @@ vlc_gl_t *vlc_gl_Create(const struct vout_display_cfg *restrict cfg,
vlc_gl_t *gl = &glpriv->gl;
gl->api_type = api_type;
gl->surface = wnd;
+ gl->device = NULL;
gl->module = vlc_module_load(gl, type, name, true, vlc_gl_start, gl,
cfg->display.width, cfg->display.height);
if (gl->module == NULL)
@@ -170,6 +171,10 @@ void vlc_gl_Release(vlc_gl_t *gl)
if (gl->destroy != NULL)
gl->destroy(gl);
+
+ if (gl->device)
+ vlc_decoder_device_Release(gl->device);
+
vlc_objres_clear(VLC_OBJECT(gl));
vlc_object_delete(gl);
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f483bdc91951208a3875da6e8a6fa0059a6d5aa8
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f483bdc91951208a3875da6e8a6fa0059a6d5aa8
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list