return Now() - begin;
}
-cTimeMs SubtitleTimeout;
+
//-------- End of cTimeMs borrowed from the vdr tools --------
DVBSubtitleCLUT::DVBSubtitleCLUT()
pageOnDisplay(65536),
running(false),
showing(false),
- threadNudged(false)
+ threadNudged(false),
+ SubtitleTimeout(0),
+ timeout_clear(false)
{
#ifndef WIN32
pthread_mutex_init(&input_mutex, NULL);
}
// after displaying regions set the page timeout timer
SubtitleTimeout.Set(page.timeout * 1000);
+ timeout_clear=false;
Log::getInstance()->log("SUBTITLES", Log::DEBUG, "SubtitleTimeout %d", page.timeout);
}
sleeptime.tv_sec = 0;
sleeptime.tv_nsec = 0;
uint64_t wakeup = 0;
+ timeout_clear=false;
while (1)
{
if (SubtitleTimeout.TimedOut()) // do we have a subtitle timeout
{
lockOutput();
- if (showing && !osdMenuShowing)
- osd->clearOSD(); // if we have the timeout, lets clear the OSD
+ if (showing && !osdMenuShowing) {
+ if (!timeout_clear) {
+ osd->clearOSD(); // if we have the timeout, lets clear the OSD
+ timeout_clear=true;
+ }
+ }
unlockOutput();
}
else // if not lets check when will we have it
{
sleeptime.tv_sec = (int)(wakeup / 1000);
sleeptime.tv_nsec = (long)(wakeup % 1000) * 10000L / 1000L * 100000L;
+ timeout_clear=false;
}
}
threadCheckExit();