[Approved] Hardcoded value for lock on signal timeout -> use ScanParameters.TimeoutTune (1 Viewer)

seco

Retired Team Member
  • Premium Supporter
  • August 7, 2007
    1,575
    1,239
    Home Country
    Finland Finland
    MP 1.0.2 has been working nearly perfectly for me, but every now and then I get "No audio/video detected" when zapping to/from certain channels. This is what I get in the logs:

    TvCardDvbBase.cs line 459: "LockedInOnSignal could not lock onto channel - no signal or bad signal"

    On line 431 there's a hardcoded value of 2 seconds for timeout

    while (!isLocked && ts.TotalSeconds < 2)

    As rtv suggested in the IRC

    19:40 <@rtv> Please look at ScanSettings.cs
    19:40 <@rtv> there's already a config value for "tune"
    19:41 <@rtv> make sure this will be used and post the patch to the forum please

    I changed the line 431:

    while (!isLocked && ts.TotalSeconds < Parameters.TimeOutTune)

    I changed this to 5 seconds in configuration and I haven't had problems since. I am not sure should we use scanning parameters here (because we are actually tuning to a channel) but either way the value shouldn't be hardcoded..

    EDIT: This atleast should be a safe fix, because Parameters.TimeOutTune has already a default value 2
     

    Attachments

    • Use_config_value_for_lockonsignal_timeout.patch
      30.8 KB

    -Manfred-

    Retired Team Member
  • Premium Supporter
  • May 15, 2007
    728
    343
    Home Country
    Finland Finland
    Fixed. Had to change Parameters to _parameters. But good finding and almost perfect patch - thx.
     

    Users who are viewing this thread

    Top Bottom