From fc2272a2a8111784370353b973f2cd311db3e2d9 Mon Sep 17 00:00:00 2001 From: Paul Lietar Date: Tue, 25 Jun 2013 10:52:57 +0200 Subject: [PATCH] Reset playing_thread on connection close. Fixes abrasive/shairport#217 pthread seems to reuse thread identifiers (at least on arm). Reset it to zero after closing a playing connection, or else future thread might believe they are playing. --- rtsp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/rtsp.c b/rtsp.c index 6b6dcfe7..63fd9648 100644 --- a/rtsp.c +++ b/rtsp.c @@ -708,6 +708,7 @@ respond: rtp_shutdown(); player_stop(); please_shutdown = 0; + playing_thread = 0; pthread_mutex_unlock(&playing_mutex); } if (auth_nonce)