rtsp: don't try and take our own player lock

This can happen during a shutdown triggered by the playing thread. Fixes
issue #233 reported by therealmuffin.
This commit is contained in:
James Laird
2013-08-25 20:30:42 +10:00
parent 928dc8024c
commit 3019a8526b
+3
View File
@@ -71,6 +71,9 @@ static inline int rtsp_playing(void) {
}
static void rtsp_take_player(void) {
if (rtsp_playing())
return;
if (pthread_mutex_trylock(&playing_mutex)) {
debug(1, "shutting down playing thread\n");
// XXX minor race condition between please_shutdown and signal delivery