summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoretobi <git@e-tobi.net>2010-11-06 16:14:34 +0100
committeretobi <git@e-tobi.net>2010-11-06 16:30:17 +0100
commit8570cc5326dbc40650c4a84b4b486be8fef36110 (patch)
treed381081b7cac7fa1cda7d78a273a142a6fdd7821
parente768bc28401b33129dc8749415dd3e26b1225c92 (diff)
downloadvdr-plugin-osdteletext-8570cc5326dbc40650c4a84b4b486be8fef36110.tar.gz
vdr-plugin-osdteletext-8570cc5326dbc40650c4a84b4b486be8fef36110.tar.bz2
Don't care if the current channel really changed, if we get a channel switch
on the primary device. After playback when the txtreceiver wass detached, the txtreciver might not get started again, because the channel hasn't changed even if the device got a channel switch message.
-rw-r--r--HISTORY2
-rw-r--r--txtrecv.c11
-rw-r--r--txtrecv.h1
3 files changed, 4 insertions, 10 deletions
diff --git a/HISTORY b/HISTORY
index 2fde612..f1a83c7 100644
--- a/HISTORY
+++ b/HISTORY
@@ -10,6 +10,8 @@ VDR Plugin 'osdteletext' Revision History
- Added command line option to enable storing TopText pages, which is
now disabled by default (References #177) (Thx to Andreas Brachold!)
- Makefile adjustments for VDR 1.7.13.
+- Don't care if the current channel really changed, if we get a channel switch
+ on the primary device (Thx to Sören Moch)
2009-06-02: version 0.8.3
- Updated Ukrainian translation provided by Yarema P. aka Knedlyk (Closes #133)
diff --git a/txtrecv.c b/txtrecv.c
index ac27c4c..c6df703 100644
--- a/txtrecv.c
+++ b/txtrecv.c
@@ -476,7 +476,6 @@ cTxtStatus::cTxtStatus(bool storeTopText, Storage* storage)
:storeTopText(storeTopText), storage(storage)
{
receiver = NULL;
- currentLiveChannel = tChannelID::InvalidID;
}
cTxtStatus::~cTxtStatus()
@@ -494,26 +493,20 @@ void cTxtStatus::ChannelSwitch(const cDevice *Device, int ChannelNumber)
cChannel* newLiveChannel = Channels.GetByNumber(ChannelNumber);
if (newLiveChannel == NULL) return;
- // ignore if channel hasn't changed
- if (currentLiveChannel == newLiveChannel->GetChannelID()) return;
-
// ignore non-live-channel-switching
if (!Device->IsPrimaryDevice() ||
ChannelNumber != cDevice::CurrentChannel()) return;
- // At this point it seems to be pretty sure to me, that the live
- // channel was changed to a new channel and OSDTeletext can
+ // live channel was changed
// now re-attach the receiver to the new live channel
- currentLiveChannel = newLiveChannel->GetChannelID();
-
delete receiver;
receiver = NULL;
int TPid = newLiveChannel->Tpid();
if (TPid) {
- receiver = new cTxtReceiver(TPid, currentLiveChannel, storeTopText, storage);
+ receiver = new cTxtReceiver(TPid, newLiveChannel->GetChannelID(), storeTopText, storage);
cDevice::ActualDevice()->AttachReceiver(receiver);
}
diff --git a/txtrecv.h b/txtrecv.h
index 0d2614d..95deab5 100644
--- a/txtrecv.h
+++ b/txtrecv.h
@@ -173,7 +173,6 @@ public:
class cTxtStatus : public cStatus {
private:
cTxtReceiver *receiver;
- tChannelID currentLiveChannel;
bool storeTopText;
Storage* storage;
protected: