From a2611b7f35ef34677eda6e7c149690e5a5a6bcc2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Mon, 2 Nov 2015 19:05:07 +0100 Subject: [PATCH] vaapidecodebin: fix a leaked display instance MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The display returned by gst_vaapi_video_context_get_display() increments the references. Thus, we have to unref the returned display. Signed-off-by: Víctor Manuel Jáquez Leal https://bugzilla.gnome.org/show_bug.cgi?id=757595 --- gst/vaapi/gstvaapidecodebin.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gst/vaapi/gstvaapidecodebin.c b/gst/vaapi/gstvaapidecodebin.c index e602d62cf2..4baec20b02 100644 --- a/gst/vaapi/gstvaapidecodebin.c +++ b/gst/vaapi/gstvaapidecodebin.c @@ -314,6 +314,12 @@ gst_vaapi_decode_bin_handle_message (GstBin * bin, GstMessage * message) activate_vpp (vaapidecbin); bail: + if (display) + gst_vaapi_display_unref (display); + + if (context) + gst_context_unref (context); + GST_BIN_CLASS (gst_vaapi_decode_bin_parent_class)->handle_message (bin, message); } -- 2.34.1