diff -Nur osdteletext-0.5.1/osdteletext.c osdteletext-0.5.1-patched/osdteletext.c --- osdteletext-0.5.1/osdteletext.c 2005-08-16 16:19:25.000000000 +0200 +++ osdteletext-0.5.1-patched/osdteletext.c 2008-06-03 16:17:25.000000000 +0200 @@ -113,7 +113,6 @@ delete txtStatus; if (channelStatus) delete channelStatus; - Storage::instance()->cleanUp(); } const char *cPluginTeletextosd::CommandLineHelp(void) diff -Nur osdteletext-0.5.1/txtrecv.c osdteletext-0.5.1-patched/txtrecv.c --- osdteletext-0.5.1/txtrecv.c 2008-06-03 16:13:30.000000000 +0200 +++ osdteletext-0.5.1-patched/txtrecv.c 2008-06-03 16:20:56.000000000 +0200 @@ -526,7 +526,7 @@ void cTxtStatus::ChannelSwitch(const cDevice *Device, int ChannelNumber) { - if (Device->IsPrimaryDevice()) { + if (Device->IsPrimaryDevice() || Device == cDevice::ActualDevice()) { /*#ifdef OSDTELETEXT_REINSERTION_PATCH if (ttSetup.suspendReceiving) { @@ -563,9 +563,9 @@ if (!channel) return; //primary device a full-featured card - if (cDevice::PrimaryDevice()->ProvidesChannel(channel, Setup.PrimaryLimit)) { + if (cDevice::ActualDevice()->ProvidesChannel(channel, Setup.PrimaryLimit)) { receiver = new cTxtReceiver(TPid, chan); - cDevice::PrimaryDevice()->AttachReceiver(receiver); + cDevice::ActualDevice()->AttachReceiver(receiver); //dsyslog("OSDTeletext: Created teletext receiver for channel %d, PID %d on primary device", ChNum, TPid); //primary device a DXR3 or similar } else { @@ -699,6 +699,7 @@ #else : cReceiver(0, -1, 1, TPid), #endif +cThread("osdteletext-receiver"), chan(chan), TxtPage(0), buffer((188+60)*75), running(false) { Storage::instance()->prepareDirectory(chan); @@ -709,7 +710,7 @@ cTxtReceiver::~cTxtReceiver() { - Detach(); + cReceiver::Detach(); if (running) { running=false; buffer.Signal(); @@ -719,6 +720,12 @@ delete TxtPage; } +void cTxtReceiver::Stop() +{ + Activate(false); +} + + void cTxtReceiver::Activate(bool On) { if (On) { diff -Nur osdteletext-0.5.1/txtrecv.h osdteletext-0.5.1-patched/txtrecv.h --- osdteletext-0.5.1/txtrecv.h 2005-08-12 13:20:14.000000000 +0200 +++ osdteletext-0.5.1-patched/txtrecv.h 2008-06-03 16:21:56.000000000 +0200 @@ -175,6 +175,7 @@ public: cTxtReceiver(int TPid, tChannelID chan); virtual ~cTxtReceiver(); + virtual void Stop(); }; class cTxtStatus : public cStatus/*, public cThread*/ {