From 3019a8526bee90ed1a86c83e2d973d6002d2cecf Mon Sep 17 00:00:00 2001 From: James Laird Date: Sun, 25 Aug 2013 20:15:56 +1000 Subject: [PATCH] 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. --- rtsp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rtsp.c b/rtsp.c index b88a5716..660ac14e 100644 --- a/rtsp.c +++ b/rtsp.c @@ -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