From d8a262a589ceca07620fab8358d59e7e31737729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 13 Oct 2014 11:56:03 +0200 Subject: [PATCH] glimagesink: Don't leak other-context --- ext/gl/gstglimagesink.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ext/gl/gstglimagesink.c b/ext/gl/gstglimagesink.c index 943f46e8df..07c40875a3 100644 --- a/ext/gl/gstglimagesink.c +++ b/ext/gl/gstglimagesink.c @@ -588,6 +588,11 @@ gst_glimage_sink_stop (GstBaseSink * bsink) glimage_sink->pool = NULL; } + if (glimage_sink->other_context) { + gst_object_unref (glimage_sink->other_context); + glimage_sink->other_context = NULL; + } + return TRUE; } @@ -679,6 +684,11 @@ gst_glimage_sink_change_state (GstElement * element, GstStateChange transition) glimage_sink->context = NULL; } + if (glimage_sink->other_context) { + gst_object_unref (glimage_sink->other_context); + glimage_sink->other_context = NULL; + } + if (glimage_sink->display) { gst_object_unref (glimage_sink->display); glimage_sink->display = NULL;