diff options
author | Aurelien Grimaud <gstelzz@yahoo.fr> | 2009-09-04 09:51:26 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-09-04 09:52:39 +0200 |
commit | fe87509682771464f4ffaae7d909b98a5c7aa51c (patch) | |
tree | e43c9a1b2e7d97ee02fde7986aedc8f94e110f6b | |
parent | f64243e037828a55a52619d62920024740484835 (diff) |
bin: Only unref EOS message after it is not used anymore
Fixes bug #594107.
-rw-r--r-- | gst/gstbin.c | 3 |
1 files changed, 3 insertions, 0 deletions
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: |