diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-04-02 21:08:48 +0200 |
---|---|---|
committer | Wim Taymans <wim@metal.(none)> | 2009-04-02 21:08:48 +0200 |
commit | 40f6ed8875959a4ca02a4c63ad7156f4cd411dc7 (patch) | |
tree | 1ceab6cdf07cb2293299cfda924f3d4561e3a160 /gst/rtsp | |
parent | 85d7fb059929d6583a04e00d0df9c4234fba85be (diff) |
rtspsrc: don't leak the udpsrc pad
Fix memory leak in rtspsrc because we didn't unref the udpsrc pad.
See #577318
Diffstat (limited to 'gst/rtsp')
-rw-r--r-- | gst/rtsp/gstrtspsrc.c | 9 |
1 files changed, 1 insertions, 8 deletions
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); |