Permalink
Browse files

Channel Scanner: Reset decryption check status when the timer elapses.

The channel scanner has timeouts for tuning, signal lock, and decryption.  A single timer variable is used, and a single method is used to check if the timer has run out.  The first thing that method did was check if we were testing decryption.  However, when that timer would elapse, the variable was not reset until after the *next* tune of a multiplex.  In essence, every timeout (tune, lock, and decryption) after the first decryption test became the hardcoded decryption timeout of 4500ms.

Nick Morrott reported that with the default timeouts, on a card with slow tuning, he found many more muxes with decryption testing enabled than without.  Because of this bug, it stands to reason that the extra 2.5-4x tuning time allowed for him to find additional muxes.  The channels found *should* match regardless of the test decryption option at this point.  In the case of cards/drivers with poor tuning performance, the right solution to find all the muxes is to increase the tuning and signal timeouts.

The above is my troubleshooting and fixing with only the code to work with (and no DVB equipment, programming, or country).  Hopefully it's right.  ;)

Fixes #8734.
  • Loading branch information...
1 parent ec7d2ec commit e7f430a9ae112307745dd4ee5a33648a1d460609 Robert McNamara committed Jun 14, 2011
Showing with 6 additions and 2 deletions.
  1. +6 −2 mythtv/libs/libmythtv/channelscan/channelscan_sm.cpp
@@ -1454,8 +1454,12 @@ void ChannelScanSM::RunScanner(void)
// See if we have timed out
bool ChannelScanSM::HasTimedOut(void)
{
- if (currentTestingDecryption)
- return (timer.elapsed() > (int)kDecryptionTimeout);
+ if (currentTestingDecryption &&
+ (timer.elapsed() > (int)kDecryptionTimeout))
+ {
+ currentTestingDecryption = false;
+ return true;
+ }
if (!waitingForTables)
return true;

0 comments on commit e7f430a

Please sign in to comment.