obs-transitions: Make sure gs calls are in graphics context

This would cause a memory leak when toggling the track matte
transition.
This commit is contained in:
Clayton Groeneveld 2021-05-14 03:39:43 -05:00 committed by Jim
parent 5fcffb066e
commit e1580d12fb

View File

@ -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();
}
}