From fe87509682771464f4ffaae7d909b98a5c7aa51c Mon Sep 17 00:00:00 2001 From: Aurelien Grimaud Date: Fri, 4 Sep 2009 09:51:26 +0200 Subject: [PATCH] bin: Only unref EOS message after it is not used anymore Fixes bug #594107. --- gst/gstbin.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst/gstbin.c b/gst/gstbin.c index 4e07f3cd9a..660cafaa07 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -2982,6 +2982,8 @@ gst_bin_handle_message_func (GstBin * bin, GstMessage * message) /* collect all eos messages from the children */ GST_OBJECT_LOCK (bin); + /* ref message for future use */ + gst_message_ref (message); bin_replace_message (bin, message, GST_MESSAGE_EOS); eos = is_eos (bin); GST_OBJECT_UNLOCK (bin); @@ -2996,6 +2998,7 @@ gst_bin_handle_message_func (GstBin * bin, GstMessage * message) "all sinks posted EOS, posting seqnum #%" G_GUINT32_FORMAT, seqnum); gst_element_post_message (GST_ELEMENT_CAST (bin), tmessage); } + gst_message_unref (message); break; } case GST_MESSAGE_STATE_DIRTY: