From 8d4a9f37e506929808106b361dc6af02ee8d1984 Mon Sep 17 00:00:00 2001 From: Adam x Nilsson Date: Mon, 9 Dec 2019 14:17:05 +0100 Subject: [PATCH] gstrtspclientsink: unref transports when closing bin Fixes #91 --- gst/rtsp-sink/gstrtspclientsink.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gst/rtsp-sink/gstrtspclientsink.c b/gst/rtsp-sink/gstrtspclientsink.c index 85f379e..60b6e52 100644 --- a/gst/rtsp-sink/gstrtspclientsink.c +++ b/gst/rtsp-sink/gstrtspclientsink.c @@ -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), -- 2.7.4