[PATCH 3/4] channel-display-gst: Don't unref appsink and pipeline objects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


It looks like setting the Gst pipeline state to GST_STATE_NULL
would cause all the references on most of the objects associated
with the pipeline to be dropped; therefore, there is no need
to explicitly unref them while freeing the pipeline. This patch
prevents the following errors from showing up when remote-viewer
is closed:

(remote-viewer:64344): GStreamer-CRITICAL **: 00:31:04.278:
Trying to dispose object "appsink0", but it still has a parent
You need to let the parent manage the object instead of unreffing the
object directly.

[MOS]:  CRITICAL - mos_bo_unreference:166: Input null ptr

[MOS]:  CRITICAL - mos_bo_unreference:166: Input null ptr

Cc: Frediano Ziglio <freddy77@xxxxxxxxx>
Cc: Dongwon Kim <dongwon.kim@xxxxxxxxx>
Cc: Jin Chung Teng <jin.chung.teng@xxxxxxxxx>
Cc: Hazwan Arif Mazlan <hazwan.arif.mazlan@xxxxxxxxx>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@xxxxxxxxx>
 src/channel-display-gst.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
index 3f46a65..ad0ac99 100644
--- a/src/channel-display-gst.c
+++ b/src/channel-display-gst.c
@@ -353,10 +353,6 @@ static void free_pipeline(SpiceGstDecoder *decoder)
     gst_element_set_state(decoder->pipeline, GST_STATE_NULL);
-    if (decoder->appsink) {
-        gst_object_unref(decoder->appsink);
-    }
-    gst_object_unref(decoder->pipeline);
     decoder->pipeline = NULL;

[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]