rtmp2: Lock self->lock before OBJECT_LOCK
authorJan Alexander Steffens (heftig) <jsteffens@make.tv>
Fri, 14 Feb 2020 13:26:27 +0000 (14:26 +0100)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 21 Feb 2020 15:20:41 +0000 (15:20 +0000)
commit14fd7e0884334ee7f8784b0f84b9c6228303f009
treede23133071f3a23dfe263911b47324ee58f734b6
parent6583e00d501ee3fd487ca2bfef10a180e5e10c0b
rtmp2: Lock self->lock before OBJECT_LOCK

OBJECT_LOCK is used to protect property access only. self->lock is
used to access the RtmpConnection, mostly between the streaming thread
and the loop thread.

To avoid deadlocks involving these two locks, we obey a lock order:
If both self->lock and OBJECT_LOCK are needed, self->lock must be locked
first. Clarify this.
gst/rtmp2/gstrtmp2sink.c
gst/rtmp2/gstrtmp2src.c