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:
parent
5fcffb066e
commit
e1580d12fb
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user