rtp: Unref events if the parent element disappeared
This commit is contained in:
parent
046f170d6a
commit
31af4fe33e
@ -1008,8 +1008,10 @@ gst_rtp_jitter_buffer_src_event (GstPad * pad, GstEvent * event)
|
|||||||
GstRtpJitterBufferPrivate *priv;
|
GstRtpJitterBufferPrivate *priv;
|
||||||
|
|
||||||
jitterbuffer = GST_RTP_JITTER_BUFFER (gst_pad_get_parent (pad));
|
jitterbuffer = GST_RTP_JITTER_BUFFER (gst_pad_get_parent (pad));
|
||||||
if (G_UNLIKELY (jitterbuffer == NULL))
|
if (G_UNLIKELY (jitterbuffer == NULL)) {
|
||||||
|
gst_event_unref (event);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
priv = jitterbuffer->priv;
|
priv = jitterbuffer->priv;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (jitterbuffer, "received %s", GST_EVENT_TYPE_NAME (event));
|
GST_DEBUG_OBJECT (jitterbuffer, "received %s", GST_EVENT_TYPE_NAME (event));
|
||||||
|
@ -434,8 +434,10 @@ gst_rtp_pt_demux_sink_event (GstPad * pad, GstEvent * event)
|
|||||||
gboolean res = FALSE;
|
gboolean res = FALSE;
|
||||||
|
|
||||||
rtpdemux = GST_RTP_PT_DEMUX (gst_pad_get_parent (pad));
|
rtpdemux = GST_RTP_PT_DEMUX (gst_pad_get_parent (pad));
|
||||||
if (G_UNLIKELY (rtpdemux == NULL))
|
if (G_UNLIKELY (rtpdemux == NULL)) {
|
||||||
|
gst_event_unref (event);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
switch (GST_EVENT_TYPE (event)) {
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
case GST_EVENT_CUSTOM_DOWNSTREAM:
|
case GST_EVENT_CUSTOM_DOWNSTREAM:
|
||||||
|
@ -1325,8 +1325,10 @@ gst_rtp_session_event_recv_rtp_sink (GstPad * pad, GstEvent * event)
|
|||||||
gboolean ret = FALSE;
|
gboolean ret = FALSE;
|
||||||
|
|
||||||
rtpsession = GST_RTP_SESSION (gst_pad_get_parent (pad));
|
rtpsession = GST_RTP_SESSION (gst_pad_get_parent (pad));
|
||||||
if (G_UNLIKELY (rtpsession == NULL))
|
if (G_UNLIKELY (rtpsession == NULL)) {
|
||||||
|
gst_event_unref (event);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (rtpsession, "received event %s",
|
GST_DEBUG_OBJECT (rtpsession, "received event %s",
|
||||||
GST_EVENT_TYPE_NAME (event));
|
GST_EVENT_TYPE_NAME (event));
|
||||||
@ -1434,6 +1436,10 @@ gst_rtp_session_event_recv_rtp_src (GstPad * pad, GstEvent * event)
|
|||||||
guint pt;
|
guint pt;
|
||||||
|
|
||||||
rtpsession = GST_RTP_SESSION (gst_pad_get_parent (pad));
|
rtpsession = GST_RTP_SESSION (gst_pad_get_parent (pad));
|
||||||
|
if (G_UNLIKELY (rtpsession == NULL)) {
|
||||||
|
gst_event_unref (event);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
switch (GST_EVENT_TYPE (event)) {
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
case GST_EVENT_CUSTOM_UPSTREAM:
|
case GST_EVENT_CUSTOM_UPSTREAM:
|
||||||
@ -1647,8 +1653,10 @@ gst_rtp_session_event_send_rtcp_src (GstPad * pad, GstEvent * event)
|
|||||||
GST_DEBUG_OBJECT (rtpsession, "received EVENT");
|
GST_DEBUG_OBJECT (rtpsession, "received EVENT");
|
||||||
|
|
||||||
rtpsession = GST_RTP_SESSION (gst_pad_get_parent (pad));
|
rtpsession = GST_RTP_SESSION (gst_pad_get_parent (pad));
|
||||||
if (G_UNLIKELY (rtpsession == NULL))
|
if (G_UNLIKELY (rtpsession == NULL)) {
|
||||||
|
gst_event_unref (event);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
switch (GST_EVENT_TYPE (event)) {
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
case GST_EVENT_SEEK:
|
case GST_EVENT_SEEK:
|
||||||
|
@ -420,8 +420,10 @@ gst_rtp_ssrc_demux_sink_event (GstPad * pad, GstEvent * event)
|
|||||||
gboolean res = FALSE;
|
gboolean res = FALSE;
|
||||||
|
|
||||||
demux = GST_RTP_SSRC_DEMUX (gst_pad_get_parent (pad));
|
demux = GST_RTP_SSRC_DEMUX (gst_pad_get_parent (pad));
|
||||||
if (G_UNLIKELY (demux == NULL))
|
if (G_UNLIKELY (demux == NULL)) {
|
||||||
|
gst_event_unref (event);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
switch (GST_EVENT_TYPE (event)) {
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
case GST_EVENT_FLUSH_STOP:
|
case GST_EVENT_FLUSH_STOP:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user