GstBaseRTPDepayloadClass *bclass;
filter = GST_BASE_RTP_DEPAYLOAD (gst_pad_get_parent (pad));
- if (G_UNLIKELY (filter == NULL))
+ if (G_UNLIKELY (filter == NULL)) {
+ gst_event_unref (event);
return FALSE;
+ }
bclass = GST_BASE_RTP_DEPAYLOAD_GET_CLASS (filter);
if (bclass->handle_event)
res = bclass->handle_event (filter, event);
+ else
+ gst_event_unref (event);
gst_object_unref (filter);
return res;
gboolean res;
basertppayload = GST_BASE_RTP_PAYLOAD (gst_pad_get_parent (pad));
- if (G_UNLIKELY (basertppayload == NULL))
+ if (G_UNLIKELY (basertppayload == NULL)) {
+ gst_event_unref (event);
return FALSE;
+ }
basertppayload_class = GST_BASE_RTP_PAYLOAD_GET_CLASS (basertppayload);
if (basertppayload_class->handle_event) {