From e1580d12fb2443c388ee6657db40a73b51bd62a6 Mon Sep 17 00:00:00 2001 From: Clayton Groeneveld Date: Fri, 14 May 2021 03:39:43 -0500 Subject: [PATCH] obs-transitions: Make sure gs calls are in graphics context This would cause a memory leak when toggling the track matte transition. --- plugins/obs-transitions/transition-stinger.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/obs-transitions/transition-stinger.c b/plugins/obs-transitions/transition-stinger.c index 13eca519c..af3ab1746 100644 --- a/plugins/obs-transitions/transition-stinger.c +++ b/plugins/obs-transitions/transition-stinger.c @@ -143,6 +143,8 @@ static void stinger_update(void *data, obs_data_t *settings) } if (s->track_matte_enabled != track_matte_was_enabled) { + obs_enter_graphics(); + gs_texrender_destroy(s->matte_tex); gs_texrender_destroy(s->stinger_tex); s->matte_tex = NULL; @@ -153,6 +155,8 @@ static void stinger_update(void *data, obs_data_t *settings) s->stinger_tex = gs_texrender_create(GS_RGBA, GS_ZS_NONE); } + + obs_leave_graphics(); } }