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
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to