mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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.
This commit is contained in:
parent
04ee765563
commit
624497b1c5
2 changed files with 18 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue