diff options
author | Tobias Grimm <git@e-tobi.net> | 2010-02-07 22:08:28 +0100 |
---|---|---|
committer | Tobias Grimm <git@e-tobi.net> | 2010-02-08 02:01:01 +0100 |
commit | e19403cc5f7996348d23528fbe6a3bc113da5e7d (patch) | |
tree | 3c6afb71ee82f140e574270ff375a11c027569e8 | |
parent | 60814863813b4f44b25e00244ef9d0b0414aea89 (diff) | |
download | vdr-plugin-ttxtsubs-e19403cc5f7996348d23528fbe6a3bc113da5e7d.tar.gz vdr-plugin-ttxtsubs-e19403cc5f7996348d23528fbe6a3bc113da5e7d.tar.bz2 |
Dont' loop forever if GetTxtxInfo failes (e.g. when no signal is available)
-rw-r--r-- | ttxtsubs.c | 17 |
1 files changed, 5 insertions, 12 deletions
@@ -389,18 +389,11 @@ void cPluginTtxtsubs::Action(void) //from a different satellite, so what really should be done is to //check if the dish is positioned while(tries<=2) { - while((geterror=GetTtxtInfo(dev->ActualDevice()->CardIndex(), c, &info))) { + if (geterror=GetTtxtInfo(dev->ActualDevice()->CardIndex(), c, &info)) { esyslog("ttxtsubs: Error: GetTtxtInfo failed!"); - cCondWait::SleepMs(1000); - getchmutex.Lock(); - bool changed=(cn!=switchChannel); - getchmutex.Unlock(); - if (changed) { - esyslog("ttxtsubs: Channel changed while looking for teletext info"); - break; - } - } - if (!geterror) { + break; + } + else { if(FindSubs(&info, &pid, &page, lang)) { //dprint("CHANNELSWITCH, pid: %d page: %x\n", pid, page); for(int i = 0; i < gNumLanguages; i++) { @@ -421,7 +414,7 @@ void cPluginTtxtsubs::Action(void) FreeTtxtInfoData(&info); tries++; } - } else break; //if(!geterror).. + } } //while(tries<=2) } lastc=cn; |