mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-02 16:52:42 +00:00
element: unref message in _post_message when there is no implementation
'gst_element_post_message' takes the ownership of the message, so it shall unref it when there is no post_message implementation. Otherwise message is leaked. https://bugzilla.gnome.org/show_bug.cgi?id=759300
This commit is contained in:
parent
b427997119
commit
51a70dd586
1 changed files with 2 additions and 0 deletions
|
@ -1743,6 +1743,8 @@ gst_element_post_message (GstElement * element, GstMessage * message)
|
|||
klass = GST_ELEMENT_GET_CLASS (element);
|
||||
if (klass->post_message)
|
||||
res = klass->post_message (element, message);
|
||||
else
|
||||
gst_message_unref (message);
|
||||
|
||||
GST_TRACER_ELEMENT_POST_MESSAGE_POST (element, res);
|
||||
return res;
|
||||
|
|
Loading…
Reference in a new issue