gstrtspclientsink: unref transports when closing bin
authorAdam x Nilsson <adamni@axis.com>
Mon, 9 Dec 2019 13:17:05 +0000 (14:17 +0100)
committerAdam x Nilsson <adamni@axis.com>
Tue, 10 Dec 2019 09:27:07 +0000 (10:27 +0100)
Fixes #91

gst/rtsp-sink/gstrtspclientsink.c

index 85f379e..60b6e52 100644 (file)
@@ -3360,8 +3360,11 @@ gst_rtsp_client_sink_close (GstRTSPClientSink * sink, gboolean async,
   for (walk = sink->contexts; walk; walk = g_list_next (walk)) {
     GstRTSPStreamContext *context = (GstRTSPStreamContext *) walk->data;
 
-    if (context->stream_transport)
+    if (context->stream_transport) {
       gst_rtsp_stream_transport_set_active (context->stream_transport, FALSE);
+      gst_object_unref (context->stream_transport);
+      context->stream_transport = NULL;
+    }
 
     if (context->joined) {
       gst_rtsp_stream_leave_bin (context->stream, GST_BIN (sink->internal_bin),