bus: handle NULL message src in debug

This commit is contained in:
Wim Taymans 2011-11-23 17:39:43 +01:00
parent 03cdd32b33
commit b7e4eeb0b0

View file

@ -481,9 +481,12 @@ gst_bus_timed_pop_filtered (GstBus * bus, GstClockTime timeout,
while ((message = gst_atomic_queue_pop (bus->queue))) {
if (bus->priv->poll)
gst_poll_read_control (bus->priv->poll);
GST_DEBUG_OBJECT (bus, "got message %p, %s from %s, type mask is %u",
message, GST_MESSAGE_TYPE_NAME (message),
GST_OBJECT_NAME (GST_MESSAGE_SRC (message)), (guint) types);
GST_MESSAGE_SRC (message) ?
GST_OBJECT_NAME (GST_MESSAGE_SRC (message)) : "NULL", (guint) types);
if ((GST_MESSAGE_TYPE (message) & types) != 0) {
/* exit the loop, we have a message */
goto beach;