gst/gstbin.c: Make default message forwarding from child->bus to bin->bus threadsafe and make it not emit warnings if...

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.
This commit is contained in:
Ronald S. Bultje 2005-08-08 13:17:07 +00:00
parent c27821d70c
commit 0454767817
2 changed files with 22 additions and 3 deletions

View file

@ -1,3 +1,9 @@
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):

View file

@ -1468,12 +1468,25 @@ bin_bus_handler (GstBus * bus, GstMessage * message, GstBin * bin)
gst_message_unref (message);
break;
}
default:
default:{
GstBus *bus;
/* Send all other messages upward */
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;
}