[sushi/wip/cosimoc/no-clutter: 16/50] media-bin: destroy video widget on sink deinit
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sushi/wip/cosimoc/no-clutter: 16/50] media-bin: destroy video widget on sink deinit
- Date: Mon, 17 Jun 2019 18:33:57 +0000 (UTC)
commit f5d5c3e960138d38d75f31cbfd826198e9a696ea
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sat Jun 15 12:17:12 2019 -0700
media-bin: destroy video widget on sink deinit
Right now, when the video sink is deinitialized, our reference to the
video widget is dropped by unreffing it.
There's an expectation that the resources used by the widget will be
released after that, but that may not actually happen as something
else could still hold another reference to the object.
This commit always calls gtk_widget_destroy() on the video widget
on deinit, to make sure nothing is left behind.
This fixes fullscreening the video player under Wayland.
src/libsushi/sushi-media-bin.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/libsushi/sushi-media-bin.c b/src/libsushi/sushi-media-bin.c
index ebabeb7..455eca4 100644
--- a/src/libsushi/sushi-media-bin.c
+++ b/src/libsushi/sushi-media-bin.c
@@ -662,8 +662,8 @@ sushi_media_bin_deinit_video_sink (SushiMediaBin *self)
/* Unref video sink */
gst_object_replace ((GstObject**)&priv->video_sink, NULL);
- /* Unref video widget */
- g_clear_object (&priv->video_widget);
+ /* Destroy video widget */
+ g_clear_pointer (&priv->video_widget, gtk_widget_destroy);
/* Unref playbin */
gst_object_replace ((GstObject**)&priv->play, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]