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; }