examples/wayland: unref GstContext after use

This commit is contained in:
Guillermo Rodríguez 2020-01-22 11:29:03 +00:00 committed by Matthew Waters
parent 09d41b0b7d
commit 21a56b396c
2 changed files with 2 additions and 0 deletions

View file

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

View file

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