macos: Fix race conditions
authorCorentin Damman <c.damman@intopix.com>
Tue, 1 Oct 2024 12:26:40 +0000 (12:26 +0000)
committerBackport Bot <gitlab-backport-bot@gstreamer-foundation.org>
Thu, 3 Oct 2024 14:21:05 +0000 (15:21 +0100)
commitd9ef7fddc64f305e57dfd9e52cf3b70cf2ffb26a
treed29ea71ea665692579df587999d92b5bec34ec69
parent279fbb2ca23c7dec518804750054ac7368a556f5
macos: Fix race conditions

This commit fixes two issues:
- The event must be posted *after* calling stop, otherwise a race condition can occur and the app never stops
- isFinishedLaunching and applicationDidFinishLaunching are not always synchronized, causing sometimes
  a deadlock on the g_cond_wait never catching the g_cond_signal

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7608>
subprojects/gstreamer/gst/gstmacos.m