gst/rtpmanager/gstrtpsession.c: Fix event leak.

Original commit message from CVS:
* gst/rtpmanager/gstrtpsession.c:
(gst_rtp_session_event_send_rtcp_src):
Fix event leak.
This commit is contained in:
Wim Taymans 2008-11-25 15:12:06 +00:00 committed by Tim-Philipp Müller
parent ae346d9a6d
commit b8408946b7

View file

@ -1373,6 +1373,7 @@ gst_rtp_session_event_recv_rtp_sink (GstPad * pad, GstEvent * event)
return ret; return ret;
} }
static GList * static GList *
gst_rtp_session_internal_links (GstPad * pad) gst_rtp_session_internal_links (GstPad * pad)
{ {
@ -1551,7 +1552,7 @@ gst_rtp_session_event_send_rtcp_src (GstPad * pad, GstEvent * event)
{ {
GstRtpSession *rtpsession; GstRtpSession *rtpsession;
GstRtpSessionPrivate *priv; GstRtpSessionPrivate *priv;
gboolean ret = FALSE; gboolean ret;
rtpsession = GST_RTP_SESSION (gst_pad_get_parent (pad)); rtpsession = GST_RTP_SESSION (gst_pad_get_parent (pad));
priv = rtpsession->priv; priv = rtpsession->priv;
@ -1560,10 +1561,13 @@ gst_rtp_session_event_send_rtcp_src (GstPad * pad, GstEvent * event)
switch (GST_EVENT_TYPE (event)) { switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_LATENCY: case GST_EVENT_LATENCY:
gst_event_unref (event);
ret = TRUE; ret = TRUE;
break; break;
default: default:
/* other events simply fail for now */ /* other events simply fail for now */
gst_event_unref (event);
ret = FALSE;
break; break;
} }