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.
This commit is contained in:
jp9000 2015-02-25 20:52:40 -08:00
parent 8e5a0970b1
commit 818a57c33f

View File

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