diff options
author | Frank Schmirler <vdr@schmirler.de> | 2010-12-02 09:00:32 +0100 |
---|---|---|
committer | Frank Schmirler <vdr@schmirler.de> | 2010-12-02 09:00:32 +0100 |
commit | 7576173547027dae57206cfd3d967d5c516fa6b7 (patch) | |
tree | 9b6de3823d222543024cc0244329974b74534bbc /client | |
parent | 5a270cc3ab659a98b4bb674acb77982f7e1ecb14 (diff) | |
download | vdr-plugin-streamdev-7576173547027dae57206cfd3d967d5c516fa6b7.tar.gz vdr-plugin-streamdev-7576173547027dae57206cfd3d967d5c516fa6b7.tar.bz2 |
Snapshot 2007-09-21
Diffstat (limited to 'client')
-rw-r--r-- | client/device.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/client/device.c b/client/device.c index be79bb9..7069c62 100644 --- a/client/device.c +++ b/client/device.c @@ -1,5 +1,5 @@ /* - * $Id: device.c,v 1.13 2007/05/07 12:18:18 schmirl Exp $ + * $Id: device.c,v 1.14 2007/07/20 06:46:47 schmirl Exp $ */ #include "client/device.h" @@ -51,12 +51,21 @@ cStreamdevDevice::cStreamdevDevice(void) { cStreamdevDevice::~cStreamdevDevice() { Dprintf("Device gets destructed\n"); + + Lock(); m_Device = NULL; - delete m_TSBuffer; - delete m_Assembler; + m_Filters->SetConnection(-1); + ClientSocket.Quit(); + ClientSocket.Reset(); + Unlock(); + + Cancel(3); + #if VDRVERSNUM >= 10300 - delete m_Filters; + DELETENULL(m_Filters); #endif + DELETENULL(m_TSBuffer); + delete m_Assembler; } bool cStreamdevDevice::ProvidesSource(int Source) const { @@ -216,7 +225,7 @@ void cStreamdevDevice::CloseDvr(void) { } bool cStreamdevDevice::GetTSPacket(uchar *&Data) { - if (m_TSBuffer) { + if (m_TSBuffer && m_Device) { Data = m_TSBuffer->Get(); #if 1 // TODO: this should be fixed in vdr cTSBuffer // simple disconnect detection |