rtsp-client: Fix some race conditions around timeout source removal
authorSebastian Dröge <sebastian@centricular.com>
Thu, 14 May 2020 07:08:32 +0000 (10:08 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 14 May 2020 08:07:46 +0000 (11:07 +0300)
commit5d8abd9bfd3bbf8ae31b0c8970bf1338dc56a593
tree0fad98c1c9b3c9c6a4db876eb509c6ba6e25cbae
parent8052957c24ffbfd368bea54cd0a3d5bf2b8890d9
rtsp-client: Fix some race conditions around timeout source removal

We always need to take the lock while accessing it as otherwise another
thread might've removed it in the meantime. Also when destroying and
creating a new one, ensure that the mutex is not shortly unlocked in
between as during that time another one might potentially be created
already.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/119>
gst/rtsp-server/rtsp-client.c