linux-capture: Fix for pipewire capture leaking texture handles

Enter the graphics context before calling gs_texture_destroy() or
else the call will fail causing the texture handles to leak.
This commit is contained in:
Florian Zwoch 2022-02-13 12:23:35 +01:00 committed by Georges Basile Stavracas Neto
parent ab1d20b237
commit d16950a2f6

View File

@ -298,8 +298,10 @@ static void destroy_session(obs_pipewire_data *obs_pw)
}
g_clear_pointer(&obs_pw->sender_name, bfree);
obs_enter_graphics();
g_clear_pointer(&obs_pw->cursor.texture, gs_texture_destroy);
g_clear_pointer(&obs_pw->texture, gs_texture_destroy);
obs_leave_graphics();
g_cancellable_cancel(obs_pw->cancellable);
g_clear_object(&obs_pw->cancellable);
}