From f0be3864ad55fd4345756cbe0c6086ea197e64c4 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Sun, 7 Oct 2012 18:27:12 +0100 Subject: [PATCH] Compatibility for VDR 1.7.30, thanks to hondansx, Uwe and MartenR. --- mvpreceiver.c | 12 ++++++++---- mvpreceiver.h | 1 + vompclient.c | 1 + vompclientrrproc.c | 1 + 4 files changed, 11 insertions(+), 4 deletions(-) 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; } -- 2.39.2