Original commit message from CVS:
* gst/gstbin.c: (bin_bus_handler):
Make default message forwarding from child->bus to bin->bus
threadsafe and make it not emit warnings if the parent has no bus.
2005-08-08 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+ * gst/gstbin.c: (bin_bus_handler):
+ Make default message forwarding from child->bus to bin->bus
+ threadsafe and make it not emit warnings if the parent has no bus.
+
+2005-08-08 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+
* gst/gstelement.c: (activate_pads):
On paused->ready, set pad->caps to NULL, as is the documented
behaviour in this state change. Fixes playback of series of
gst_message_unref (message);
break;
}
- default:
+ default:{
+ GstBus *bus;
+
/* Send all other messages upward */
- GST_DEBUG_OBJECT (bin, "posting message upward");
- gst_bus_post (GST_ELEMENT (bin)->bus, message);
+ GST_LOCK (bin);
+ if (!(bus = GST_ELEMENT (bin)->bus)) {
+ GST_DEBUG_OBJECT (bin, "dropping message because no parent bus");
+ GST_UNLOCK (bin);
+ } else {
+ gst_object_ref (bus);
+ GST_UNLOCK (bin);
+
+ GST_DEBUG_OBJECT (bin, "posting message upward");
+ gst_bus_post (GST_ELEMENT (bin)->bus, message);
+ gst_object_unref (bus);
+ }
break;
+ }
}
return GST_BUS_DROP;