From 101205d429ca9cf509aec486b98978df139b9529 Mon Sep 17 00:00:00 2001 From: Philippe Normand Date: Wed, 1 Nov 2023 15:11:41 +0000 Subject: [PATCH] ges: timeline: Fix message leaks Part-of: --- subprojects/gst-editing-services/ges/ges-timeline.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/subprojects/gst-editing-services/ges/ges-timeline.c b/subprojects/gst-editing-services/ges/ges-timeline.c index 5d033d6e32..864e41d02f 100644 --- a/subprojects/gst-editing-services/ges/ges-timeline.c +++ b/subprojects/gst-editing-services/ges/ges-timeline.c @@ -447,12 +447,13 @@ ges_timeline_handle_message (GstBin * bin, GstMessage * message) if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ASYNC_START) { GST_INFO_OBJECT (timeline, "Dropping %" GST_PTR_FORMAT, message); + gst_message_unref (message); return; } if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ASYNC_DONE) { GST_INFO_OBJECT (timeline, "Dropping %" GST_PTR_FORMAT, message); - + gst_message_unref (message); return; } @@ -502,15 +503,15 @@ ges_timeline_handle_message (GstBin * bin, GstMessage * message) GST_OBJECT_UNLOCK (timeline); } + gst_message_unref (message); if (amessage) { - gst_message_unref (message); gst_element_post_message (GST_ELEMENT_CAST (bin), amessage); - return; } + return; } forward: - gst_element_post_message (GST_ELEMENT_CAST (bin), message); + GST_BIN_CLASS (parent_class)->handle_message (bin, message); } static GstStateChangeReturn