mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
element: Unref event if GstElement::send_event() is not implemented
Otherwise we'll take ownership of the event only if it's implemented, and leak the event in all other situations.
This commit is contained in:
parent
ad5c97e44e
commit
615af0b1b0
1 changed files with 2 additions and 0 deletions
|
@ -1570,6 +1570,8 @@ gst_element_send_event (GstElement * element, GstEvent * event)
|
|||
GST_CAT_DEBUG (GST_CAT_ELEMENT_PADS, "send %s event on element %s",
|
||||
GST_EVENT_TYPE_NAME (event), GST_ELEMENT_NAME (element));
|
||||
result = oclass->send_event (element, event);
|
||||
} else {
|
||||
gst_event_unref (event);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Reference in a new issue