diff --git a/ChangeLog b/ChangeLog index 86c8f30590..c17bdfdda3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-05-05 Tim-Philipp Müller + + Patch by: Sjoerd Simons + + * gst/gstbus.c: (gst_bus_source_dispatch): + Don't print a warning if the queue is empty when we try to pop + here. That could happen if another thread or callback set the + bus to flushing between the source's check/prepare and the + dispatch being called (#531538). + 2008-05-05 Tim-Philipp Müller * plugins/elements/gstmultiqueue.c: diff --git a/gst/gstbus.c b/gst/gstbus.c index cfffdd4600..c2a90935d4 100644 --- a/gst/gstbus.c +++ b/gst/gstbus.c @@ -769,7 +769,11 @@ gst_bus_source_dispatch (GSource * source, GSourceFunc callback, g_return_val_if_fail (GST_IS_BUS (bus), FALSE); message = gst_bus_pop (bus); - g_return_val_if_fail (message != NULL, FALSE); + + /* The message queue might be empty if some other thread or callback set + * the bus to flushing between check/prepare and dispatch */ + if (G_UNLIKELY (message == NULL)) + return TRUE; if (!handler) goto no_handler;