diff options
author | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2009-05-08 16:28:03 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2009-05-11 23:41:52 +0100 |
commit | 06d79151c1aa45b4d6c7988ddc58a04993960e2a (patch) | |
tree | 3406e7fa7949952718fd685e00d723805ee01d5f | |
parent | b962f41ca1df778a60a7ee01e437a385e136a1e4 (diff) |
bin: fix debug message
Make the debug message show what's actually happening (the message
replaced here is not necessarily of the same type as the one that
replaces it).
-rw-r--r-- | gst/gstbin.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gst/gstbin.c b/gst/gstbin.c index 2be44805a7..6f67e5db54 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -831,12 +831,16 @@ bin_replace_message (GstBin * bin, GstMessage * message, GstMessageType types) if ((src = GST_MESSAGE_SRC (message))) { /* first find the previous message posted by this element */ if ((previous = find_message (bin, src, types))) { + GstMessage *previous_msg; + /* if we found a previous message, replace it */ - gst_message_unref (previous->data); + previous_msg = previous->data; previous->data = message; - GST_DEBUG_OBJECT (bin, "replace old message %s from %s", - name, GST_ELEMENT_NAME (src)); + GST_DEBUG_OBJECT (bin, "replace old message %s from %s with %s message", + GST_MESSAGE_TYPE_NAME (previous_msg), GST_ELEMENT_NAME (src), name); + + gst_message_unref (previous_msg); } else { /* keep new message */ bin->messages = g_list_prepend (bin->messages, message); |