summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Grimm <tobias@e-tobi.loc>2008-12-02 22:37:17 +0100
committerTobias Grimm <tobias@e-tobi.loc>2008-12-02 23:08:23 +0100
commit886bdaa2fc4677a5ed2ecb6aeb67424198e27934 (patch)
tree3e5d342c13263747391f653466227fab1da3e037
parent91fdd60185c41dfd1c75fe0f0490d01f4c9d7074 (diff)
downloadvdr-plugin-osdteletext-886bdaa2fc4677a5ed2ecb6aeb67424198e27934.tar.gz
vdr-plugin-osdteletext-886bdaa2fc4677a5ed2ecb6aeb67424198e27934.tar.bz2
Fixed problems when switching channels on FF+Budget systems
See: http://www.vdr-portal.de/board/thread.php?postid=728192#post728192
-rw-r--r--txtrecv.c16
-rw-r--r--txtrecv.h1
2 files changed, 13 insertions, 4 deletions
diff --git a/txtrecv.c b/txtrecv.c
index e7898e1..73ba499 100644
--- a/txtrecv.c
+++ b/txtrecv.c
@@ -521,12 +521,15 @@ cTxtStatus::~cTxtStatus()
/*if (running)
Cancel(3);*/
if (receiver)
+ {
+ receiver->Stop();
delete receiver;
+ }
}
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 +566,9 @@ void cTxtStatus::CheckCreateReceiver() {
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 {
@@ -710,7 +713,7 @@ cTxtReceiver::cTxtReceiver(int TPid, tChannelID chan)
cTxtReceiver::~cTxtReceiver()
{
- Detach();
+ cReceiver::Detach();
if (running) {
running=false;
buffer.Signal();
@@ -720,6 +723,11 @@ cTxtReceiver::~cTxtReceiver()
delete TxtPage;
}
+void cTxtReceiver::Stop()
+{
+ Activate(false);
+}
+
void cTxtReceiver::Activate(bool On)
{
if (On) {
diff --git a/txtrecv.h b/txtrecv.h
index cafb1dd..927350d 100644
--- a/txtrecv.h
+++ b/txtrecv.h
@@ -175,6 +175,7 @@ protected:
public:
cTxtReceiver(int TPid, tChannelID chan);
virtual ~cTxtReceiver();
+ virtual void Stop();
};
class cTxtStatus : public cStatus/*, public cThread*/ {