From 943b7e57e992461b798641e5ab628cf0a36765f2 Mon Sep 17 00:00:00 2001 From: phintuka Date: Fri, 26 Jan 2007 16:07:01 +0000 Subject: Detach frontends from VDR before shutdown --- device.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'device.c') diff --git a/device.c b/device.c index 9118143b..9a68b950 100644 --- a/device.c +++ b/device.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: device.c,v 1.33 2007-01-24 05:12:26 phintuka Exp $ + * $Id: device.c,v 1.34 2007-01-26 16:07:01 phintuka Exp $ * */ @@ -285,11 +285,26 @@ void cXinelibDevice::StopDevice(void) m_spuDecoder = NULL; } + cXinelibThread *server = m_server; + cXinelibThread *local = m_local; + m_local = m_server = NULL; + + cControl::Shutdown(); ForEach(m_clients, &cXinelibThread::SetLiveMode, false); TrickSpeed(-1); - ForEach(m_clients, &cXinelibThread::Stop); + + if(local) m_clients.Del(local, false); + if(server) m_clients.Del(server, false); + + if(server) { + server->Stop(); + delete server; + } + if(local) { + local->Stop(); + delete local; + } - m_local = m_server = NULL; m_clients.Clear(); } -- cgit v1.2.3