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)
committerMark Nauwelaerts <mnauw@users.sourceforge.net>
Sat, 11 May 2019 22:38:46 +0000 (22:38 +0000)
commitdbab2f94986e508df5fa1d6cff8548362f78291b
tree55fa5996531a4eabe3a7efe06ef62a8d244e09eb
parentcc11a7f9d75315d17a585486cda0148793d18ea7
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