mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
bus: do not leak messages if there is no async handler
This does not typically happen because "enable-async" property is TRUE by default. The only place where it is set to FALSE is in GstBin where a sync handler is used and always returns GST_BUS_DROP. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6124>
This commit is contained in:
parent
350345150e
commit
57f12dd2fa
1 changed files with 6 additions and 3 deletions
|
@ -366,10 +366,13 @@ gst_bus_post (GstBus * bus, GstMessage * message)
|
|||
|
||||
g_clear_pointer (&sync_handler, sync_handler_unref);
|
||||
|
||||
/* If this is a bus without async message delivery
|
||||
* always drop the message */
|
||||
if (!bus->priv->poll)
|
||||
/* If this is a bus without async message delivery always drop the message.
|
||||
* If the sync handler returned GST_BUS_DROP it is responsible of unreffing
|
||||
* the message, otherwise do it ourself. */
|
||||
if (!bus->priv->poll && reply != GST_BUS_DROP) {
|
||||
reply = GST_BUS_DROP;
|
||||
gst_message_unref (message);
|
||||
}
|
||||
|
||||
/* now see what we should do with the message */
|
||||
switch (reply) {
|
||||
|
|
Loading…
Reference in a new issue