diff options
| author | etobi <git@e-tobi.net> | 2010-11-06 16:14:34 +0100 |
|---|---|---|
| committer | etobi <git@e-tobi.net> | 2010-11-06 16:30:17 +0100 |
| commit | 8570cc5326dbc40650c4a84b4b486be8fef36110 (patch) | |
| tree | d381081b7cac7fa1cda7d78a273a142a6fdd7821 | |
| parent | e768bc28401b33129dc8749415dd3e26b1225c92 (diff) | |
| download | vdr-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-- | HISTORY | 2 | ||||
| -rw-r--r-- | txtrecv.c | 11 | ||||
| -rw-r--r-- | txtrecv.h | 1 |
3 files changed, 4 insertions, 10 deletions
@@ -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) @@ -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); } @@ -173,7 +173,6 @@ public: class cTxtStatus : public cStatus { private: cTxtReceiver *receiver; - tChannelID currentLiveChannel; bool storeTopText; Storage* storage; protected: |
