mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
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).
This commit is contained in:
parent
b962f41ca1
commit
06d79151c1
1 changed files with 7 additions and 3 deletions
10
gst/gstbin.c
10
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);
|
||||
|
|
Loading…
Reference in a new issue