From: Victor Toso <me@xxxxxxxxxxxxxx> Let's gst_deinit() if we initialize it for the same rationale pointed out in 0381e62 "spicy: Add call of gst_deinit at program exit" in 2017-10-20 by Christophe de Dinechin <dinechin@xxxxxxxxxx> Signed-off-by: Victor Toso <victortoso@xxxxxxxxxx> --- src/spice-session.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/spice-session.c b/src/spice-session.c index db40a53..2135348 100644 --- a/src/spice-session.c +++ b/src/spice-session.c @@ -123,6 +123,8 @@ struct _SpiceSessionPrivate { gchar *name; SpiceImageCompression preferred_compression; + bool gst_init_by_spice; + /* associated objects */ SpiceAudio *audio_manager; SpiceUsbDeviceManager *usb_manager; @@ -343,6 +345,10 @@ spice_session_dispose(GObject *gobject) g_warn_if_fail(s->channels_destroying == 0); g_warn_if_fail(s->channels == NULL); + if (session->priv->gst_init_by_spice) { + gst_deinit(); + } + g_clear_object(&s->audio_manager); g_clear_object(&s->usb_manager); g_clear_object(&s->proxy); @@ -2888,5 +2894,7 @@ spice_session_enable_gstreamer(SpiceSession *session) if (!gst_init_check(NULL, NULL, &err)) { spice_warning("Disabling GStreamer video support: %s", err->message); g_clear_error(&err); + } else { + session->priv->gst_init_by_spice = true; } } -- 2.21.0 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel