[vlc-commits] [Git][videolan/vlc][master] libplacebo: opengl: fix double-release

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sat Feb 4 13:06:38 UTC 2023



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
5f8548bc by Niklas Haas at 2023-02-04T12:54:56+00:00
libplacebo: opengl: fix double-release

glReleaseCurrent accidentally gets run twice in this code, including
once before creating the swapchain (where we definitely want the process
to be current!).

Fix this logic to only release the context once.

- - - - -


1 changed file:

- modules/video_output/libplacebo/instance_opengl.c


Changes:

=====================================
modules/video_output/libplacebo/instance_opengl.c
=====================================
@@ -121,7 +121,6 @@ static int InitInstance(vlc_placebo_t *pl, const vout_display_cfg_t *cfg)
         .proc_ctx = sys->gl,
 #endif
     });
-    vlc_gl_ReleaseCurrent (sys->gl);
     if (!sys->opengl)
         goto error;
 
@@ -138,6 +137,7 @@ static int InitInstance(vlc_placebo_t *pl, const vout_display_cfg_t *cfg)
         goto error;
 
     vlc_gl_ReleaseCurrent(sys->gl);
+    current = false;
 
     pl->gpu = sys->opengl->gpu;
     pl->ops = &instance_opts;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5f8548bc299e3cd05123325f18b8d423d4d511a0

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5f8548bc299e3cd05123325f18b8d423d4d511a0
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list