Commit 624497b1 authored by Tommi Myöhänen's avatar Tommi Myöhänen Committed by Wim Taymans
Browse files

gst/rtsp/gstrtspsrc.c: Fix 3 pad leaks. Fixes #496983.

Original commit message from CVS:
Patch by: Tommi Myöhänen  <ext-tommi dot myohanen at nokia dot com>
* gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_stream_free),
(gst_rtspsrc_stream_configure_tcp):
Fix 3 pad leaks. Fixes #496983.
parent 04ee7655
2007-11-15 Wim Taymans <wim.taymans@gmail.com>
Patch by: Tommi Myöhänen <ext-tommi dot myohanen at nokia dot com>
* gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_stream_free),
(gst_rtspsrc_stream_configure_tcp):
Fix 3 pad leaks. Fixes #496983.
2007-11-15 Wim Taymans <wim.taymans@gmail.com>
 
Patch by: Tommi Myöhänen <ext-tommi dot myohanen at nokia dot com>
......
......@@ -692,8 +692,6 @@ gst_rtspsrc_stream_free (GstRTSPSrc * src, GstRTSPStream * stream)
pad = gst_element_get_pad (udpsrc, "src");
if (stream->channelpad[i]) {
gst_pad_unlink (pad, stream->channelpad[i]);
gst_object_unref (stream->channelpad[i]);
stream->channelpad[i] = NULL;
}
gst_element_set_state (udpsrc, GST_STATE_NULL);
......@@ -701,6 +699,10 @@ gst_rtspsrc_stream_free (GstRTSPSrc * src, GstRTSPStream * stream)
gst_object_unref (stream->udpsrc[i]);
stream->udpsrc[i] = NULL;
}
if (stream->channelpad[i]) {
gst_object_unref (stream->channelpad[i]);
stream->channelpad[i] = NULL;
}
}
if (stream->udpsink) {
gst_element_set_state (stream->udpsink, GST_STATE_NULL);
......@@ -716,6 +718,10 @@ gst_rtspsrc_stream_free (GstRTSPSrc * src, GstRTSPStream * stream)
}
stream->srcpad = NULL;
}
if (stream->rtcppad) {
gst_object_unref (stream->rtcppad);
stream->rtcppad = NULL;
}
g_free (stream);
}
......@@ -1875,6 +1881,8 @@ gst_rtspsrc_stream_configure_tcp (GstRTSPSrc * src, GstRTSPStream * stream,
/* and link */
if (pad)
gst_pad_link (pad, stream->rtcppad);
gst_object_unref (template);
}
return TRUE;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment