From 40f6ed8875959a4ca02a4c63ad7156f4cd411dc7 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 2 Apr 2009 21:08:48 +0200 Subject: rtspsrc: don't leak the udpsrc pad Fix memory leak in rtspsrc because we didn't unref the udpsrc pad. See #577318 --- gst/rtsp/gstrtspsrc.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'gst/rtsp') diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index 262d4b9d..d7f707eb 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -829,14 +829,6 @@ gst_rtspsrc_stream_free (GstRTSPSrc * src, GstRTSPStream * stream) for (i = 0; i < 2; i++) { if (stream->udpsrc[i]) { - GstPad *pad; - - /* unlink the pad */ - pad = gst_element_get_static_pad (stream->udpsrc[i], "src"); - if (stream->channelpad[i]) { - gst_pad_unlink (pad, stream->channelpad[i]); - } - gst_element_set_state (stream->udpsrc[i], GST_STATE_NULL); gst_bin_remove (GST_BIN_CAST (src), stream->udpsrc[i]); gst_object_unref (stream->udpsrc[i]); @@ -1229,6 +1221,7 @@ again: GST_DEBUG_OBJECT (src, "free RTCP udpsrc"); gst_element_set_state (udpsrc1, GST_STATE_NULL); gst_object_unref (udpsrc1); + udpsrc1 = NULL; tmp_rtp += 2; GST_DEBUG_OBJECT (src, "retry %d", count); -- cgit