gst/gstbus.c: Improve debugging when dealing with _poll().
authorWim Taymans <wim.taymans@gmail.com>
Wed, 26 Sep 2007 18:06:42 +0000 (18:06 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Wed, 26 Sep 2007 18:06:42 +0000 (18:06 +0000)
Original commit message from CVS:
* gst/gstbus.c: (poll_func):
Improve debugging when dealing with _poll().

ChangeLog
gst/gstbus.c

index 8fe6d96..a443675 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-09-26  Wim Taymans  <wim.taymans@gmail.com>
+
+       * gst/gstbus.c: (poll_func):
+       Improve debugging when dealing with _poll().
+
 2007-09-26  Tim-Philipp Müller  <tim at centricular dot net>
 
        * gst/gstregistryxml.c:
index facfee8..545baaa 100644 (file)
@@ -834,17 +834,23 @@ typedef struct
 static void
 poll_func (GstBus * bus, GstMessage * message, GstBusPollData * poll_data)
 {
+  GstMessageType type;
+
   if (!g_main_loop_is_running (poll_data->loop)) {
     GST_DEBUG ("mainloop %p not running", poll_data->loop);
     return;
   }
 
-  if (GST_MESSAGE_TYPE (message) & poll_data->events) {
+  type = GST_MESSAGE_TYPE (message);
+
+  if (type & poll_data->events) {
     g_return_if_fail (poll_data->message == NULL);
     /* keep ref to message */
     poll_data->message = gst_message_ref (message);
     GST_DEBUG ("mainloop %p quit", poll_data->loop);
     g_main_loop_quit (poll_data->loop);
+  } else {
+    GST_DEBUG ("type %08x does not match %08x", type, poll_data->events);
   }
 }