Skip to content

gst: Delay creation of threadpools

Edward Hervey requested to merge bilboed/gstreamer:delay-threadpool into master

Since glib 2.64, gthreadpool will start waiting on a GCond immediately upon creation. This can cause issues if we fork before actually using the threadpool since we will then be signalling that GCond ... from another process and that will never work.

Instead, delay creationg of thread pools until the very first time we need them. This introduces a minor (un-noticeable) delay when needing a new thread but fixes the issues for all users of GSTreamer that will call gst_init, then fork and actually start pipelines.

Edited by Edward Hervey

Merge request reports