srt: avoid srtsrc segfault upon downward state change
authorMark Nauwelaerts <mnauw@users.sourceforge.net>
Wed, 1 May 2019 17:01:03 +0000 (19:01 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 8 Aug 2019 16:13:37 +0000 (17:13 +0100)
commit8fe82faf16067a5910f0016559cf1d38be298001
tree911d4c088649acdb3caed6d9e4460fb7cef836d7
parent64160dcc172adeef7381db92344193e309eb28e0
srt: avoid srtsrc segfault upon downward state change

... when it has not yet been connected to.

Also, a condition variable is not a semaphore, so a lock/wait/unlock
sequence is inherently racy without any state checking.  So switch to
a different lock and check the intended state.
ext/srt/gstsrtobject.c
ext/srt/gstsrtobject.h