diff options
author | phintuka <phintuka> | 2007-01-26 16:07:01 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2007-01-26 16:07:01 +0000 |
commit | 943b7e57e992461b798641e5ab628cf0a36765f2 (patch) | |
tree | 6039e7affe01b64828509f69f6a2d08314d0930e /device.c | |
parent | e43b2bb806f8ccd9b80afc81d3ef8d3c0bf4d8e0 (diff) | |
download | xineliboutput-943b7e57e992461b798641e5ab628cf0a36765f2.tar.gz xineliboutput-943b7e57e992461b798641e5ab628cf0a36765f2.tar.bz2 |
Detach frontends from VDR before shutdown
Diffstat (limited to 'device.c')
-rw-r--r-- | device.c | 21 |
1 files changed, 18 insertions, 3 deletions
@@ -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(); } |