From 818a57c33f37828ca0a438003a4b7af573cec7ab Mon Sep 17 00:00:00 2001 From: jp9000 Date: Wed, 25 Feb 2015 20:52:40 -0800 Subject: [PATCH] libobs: Fix graphics memory leak Graphics data has to be freed inside of an active graphics context, otherwise the resources will not be freed; in the future, we should probably make sure that the graphics subsystem automatically asserts/warns about this scenario. --- libobs/obs-source.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libobs/obs-source.c b/libobs/obs-source.c index 66f2848a0..8acfdf5cd 100644 --- a/libobs/obs-source.c +++ b/libobs/obs-source.c @@ -258,6 +258,7 @@ void obs_source_destroy(struct obs_source *source) gs_enter_context(obs->video.graphics); gs_texrender_destroy(source->async_convert_texrender); gs_texture_destroy(source->async_texture); + gs_texrender_destroy(source->filter_texrender); gs_leave_context(); for (i = 0; i < MAX_AV_PLANES; i++) @@ -266,7 +267,6 @@ void obs_source_destroy(struct obs_source *source) audio_line_destroy(source->audio_line); audio_resampler_destroy(source->resampler); - gs_texrender_destroy(source->filter_texrender); da_free(source->async_cache); da_free(source->async_frames); da_free(source->filters);