From 21a56b396cf75b322fded95b44065ab3a6bba55c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Rodr=C3=ADguez?= Date: Wed, 22 Jan 2020 11:29:03 +0000 Subject: [PATCH] examples/wayland: unref GstContext after use --- tests/examples/waylandsink/main.c | 1 + tests/examples/waylandsink/wayland-threads.c | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/examples/waylandsink/main.c b/tests/examples/waylandsink/main.c index 2f9bf8954a..19abd6c329 100644 --- a/tests/examples/waylandsink/main.c +++ b/tests/examples/waylandsink/main.c @@ -95,6 +95,7 @@ bus_sync_handler (GstBus * bus, GstMessage * message, gpointer user_data) display_handle = gdk_wayland_display_get_wl_display (display); context = gst_wayland_display_handle_context_new (display_handle); gst_element_set_context (GST_ELEMENT (GST_MESSAGE_SRC (message)), context); + gst_context_unref (context); goto drop; } else if (gst_is_video_overlay_prepare_window_handle_message (message)) { diff --git a/tests/examples/waylandsink/wayland-threads.c b/tests/examples/waylandsink/wayland-threads.c index 971225fc71..082309e5cd 100644 --- a/tests/examples/waylandsink/wayland-threads.c +++ b/tests/examples/waylandsink/wayland-threads.c @@ -80,6 +80,7 @@ bus_sync_handler (GstBus * bus, GstMessage * message, gpointer user_data) GstContext *context; context = gst_wayland_display_handle_context_new (app->display); gst_element_set_context (GST_ELEMENT (GST_MESSAGE_SRC (message)), context); + gst_context_unref (context); goto drop; }