gst-rtsp-server: fix race in rtsp-client
authorBranko Subasic <branko@axis.com>
Mon, 7 Mar 2022 08:14:46 +0000 (09:14 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 7 Mar 2022 09:15:11 +0000 (09:15 +0000)
commit41d436e56e493b1400b4c7da2e0dceafe67b4a35
tree79ec33d2f854a6b2a02452e73725468b50592aab
parentc9aa5294847db981df1e65f467e53041a0a601e9
gst-rtsp-server: fix race in rtsp-client

When tunneling over HTTP, if connection on the second channel happens
before the control timer is created we may trigger an assert in
rtsp_ctrl_timeout_remove(). Avoid that by taking the priv->lock before
attaching the client thread to the context.

Fixes #1025

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