From: Chris Tallon Date: Sun, 7 Oct 2012 17:27:12 +0000 (+0100) Subject: Compatibility for VDR 1.7.30, thanks to hondansx, Uwe and MartenR. X-Git-Tag: 0-4-0~4 X-Git-Url: https://git.vomp.tv/gitweb/?a=commitdiff_plain;h=f0be3864ad55fd4345756cbe0c6086ea197e64c4;p=vompserver.git Compatibility for VDR 1.7.30, thanks to hondansx, Uwe and MartenR. --- diff --git a/mvpreceiver.c b/mvpreceiver.c index b27d8c9..b5722a3 100644 --- a/mvpreceiver.c +++ b/mvpreceiver.c @@ -78,9 +78,6 @@ int MVPReceiver::init(TCP* ttcp, ULONG tstreamID) MVPReceiver::~MVPReceiver() { - Detach(); - threadStop(); - numMVPReceivers--; Log::getInstance()->log("MVPReceiver", Log::DEBUG, "num mvp receivers now down to %i", numMVPReceivers); } @@ -106,6 +103,12 @@ bool MVPReceiver::isVdrActivated() return vdrActivated; } +void MVPReceiver::detachMVPReceiver() +{ + threadStop(); + Detach(); +} + void MVPReceiver::Receive(UCHAR* data, int length) { pthread_mutex_lock(&processedRingLock); @@ -170,4 +173,5 @@ int *MVPReceiver::mergeSpidsTpid(const int *spids,int tpid) destpids++; *destpids=0; return mergedSpidsTpid; -} +} + diff --git a/mvpreceiver.h b/mvpreceiver.h index 4bfd25f..e1acf39 100644 --- a/mvpreceiver.h +++ b/mvpreceiver.h @@ -38,6 +38,7 @@ class MVPReceiver : public cReceiver, public Thread virtual ~MVPReceiver(); int init(TCP* tcp, ULONG streamID); bool isVdrActivated(); + void detachMVPReceiver(); private: MVPReceiver(cChannel* channel, cDevice* device); diff --git a/vompclient.c b/vompclient.c index 25dc541..011b5c6 100644 --- a/vompclient.c +++ b/vompclient.c @@ -70,6 +70,7 @@ VompClient::~VompClient() #ifndef VOMPSTANDALONE if (lp) { + lp->detachMVPReceiver(); delete lp; lp = NULL; } diff --git a/vompclientrrproc.c b/vompclientrrproc.c index 3d1bf08..0bf9785 100644 --- a/vompclientrrproc.c +++ b/vompclientrrproc.c @@ -1113,6 +1113,7 @@ int VompClientRRProc::processStopStreaming() log->log("RRProc", Log::DEBUG, "STOP STREAMING RECEIVED"); if (x.lp) { + x.lp->detachMVPReceiver(); delete x.lp; x.lp = NULL; }