Skip to content

bus: Use new GSource dispose function

Sebastian Dröge requested to merge slomo/gstreamer:bus-source-dispose into master

Without this it is possible that we have a GSource with reference count 0 stored in the GstBus that is currently in the process of being destroyed. gst_bus_remove_watch() might then access it, increase its reference count to 1 again, call GSource API on it and then unref it, which will then finalize it a second time.

The dispose function allows the GSource to be resurrected until it returned so the above would be safe now.

This caused some spurious crashes during shutdown in various applications.


Depends on https://gitlab.gnome.org/GNOME/glib/merge_requests/1175

Edited by Sebastian Dröge

Merge request reports

Loading