summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorphintuka <phintuka>2007-01-26 16:07:01 +0000
committerphintuka <phintuka>2007-01-26 16:07:01 +0000
commit943b7e57e992461b798641e5ab628cf0a36765f2 (patch)
tree6039e7affe01b64828509f69f6a2d08314d0930e /device.c
parente43b2bb806f8ccd9b80afc81d3ef8d3c0bf4d8e0 (diff)
downloadxineliboutput-943b7e57e992461b798641e5ab628cf0a36765f2.tar.gz
xineliboutput-943b7e57e992461b798641e5ab628cf0a36765f2.tar.bz2
Detach frontends from VDR before shutdown
Diffstat (limited to 'device.c')
-rw-r--r--device.c21
1 files changed, 18 insertions, 3 deletions
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();
}