summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Grimm <git@e-tobi.net>2010-02-07 22:08:28 +0100
committerTobias Grimm <git@e-tobi.net>2010-02-08 02:01:01 +0100
commite19403cc5f7996348d23528fbe6a3bc113da5e7d (patch)
tree3c6afb71ee82f140e574270ff375a11c027569e8
parent60814863813b4f44b25e00244ef9d0b0414aea89 (diff)
downloadvdr-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.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/ttxtsubs.c b/ttxtsubs.c
index 39e858c..cab8a14 100644
--- a/ttxtsubs.c
+++ b/ttxtsubs.c
@@ -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;