systemclock: Don't keep the clock entry locked while getting the time from the clock
authorSebastian Dröge <sebastian@centricular.com>
Thu, 28 Nov 2024 14:06:17 +0000 (16:06 +0200)
committerBackport Bot <gitlab-backport-bot@gstreamer-foundation.org>
Mon, 2 Dec 2024 10:00:27 +0000 (10:00 +0000)
commitfb6fecb60357bb16e8124c87c3ce4393d164cf06
treea9e95e28cdc3a9b28522e706c540c373d3722992
parentf78ac8398781305ed5da9aff7bd149d76b56b9df
systemclock: Don't keep the clock entry locked while getting the time from the clock

gst_clock_get_time() will take the clock mutex, which would then result in a lock
order violation and possible deadlocks. If both mutexes are to be locked, the
clock must always be locked first.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8019>
subprojects/gstreamer/gst/gstsystemclock.c