rtsp-client: Fix race condition in rtsp ctrl timeout by WeakRef client
authorKristofer Björkström <kristofb@axis.com>
Mon, 25 May 2020 11:49:45 +0000 (13:49 +0200)
committerKristofer Björkström <kristofb@axis.com>
Wed, 27 May 2020 13:31:34 +0000 (15:31 +0200)
commitba7d568bb3103840abc086db657564817a73b03d
treebc43d881e9dbbeb57e17b5308d1fdd9c3ded5c89
parent6459a61e8f5ece3f18163780aa7bc1027b45b059
rtsp-client: Fix race condition in rtsp ctrl timeout by WeakRef client

There was a race condition where client was being finalized and
concurrently in some other thread the rtsp ctrl timout was relying on
client data that was being freed.
When rtsp ctrl timeout is setup, a WeakRef on Client is set.

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