mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 17:18:15 +00:00
rtpptdemux: fix memleak on custom downstream events
by not sending custom downstream event twice and fix memleak when not handling the event https://bugzilla.gnome.org/show_bug.cgi?id=623196
This commit is contained in:
parent
c96f8bd430
commit
244a35a226
1 changed files with 6 additions and 1 deletions
|
@ -429,7 +429,7 @@ gst_rtp_pt_demux_sink_event (GstPad * pad, GstEvent * event)
|
|||
GstRtpPtDemux *rtpdemux;
|
||||
gboolean res = FALSE;
|
||||
|
||||
rtpdemux = GST_RTP_PT_DEMUX (GST_PAD_PARENT (pad));
|
||||
rtpdemux = GST_RTP_PT_DEMUX (gst_pad_get_parent (pad));
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_CUSTOM_DOWNSTREAM:
|
||||
|
@ -444,15 +444,20 @@ gst_rtp_pt_demux_sink_event (GstPad * pad, GstEvent * event)
|
|||
|
||||
if (rtpdemuxpad)
|
||||
res = gst_pad_push_event (rtpdemuxpad->pad, event);
|
||||
else
|
||||
gst_event_unref (event);
|
||||
|
||||
} else {
|
||||
res = gst_pad_event_default (pad, event);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
res = gst_pad_event_default (pad, event);
|
||||
break;
|
||||
}
|
||||
|
||||
gst_object_unref (rtpdemux);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue