Ticket #5882: bad_tuning_fix.diff

File bad_tuning_fix.diff, 1.0 KB (added by mnix <mythtv-acct@…>, 3 years ago)

Fix for long scanning wait when bad tuning parameters are provided

  • dvbchannel.cpp

    old new  
    661661        return false; 
    662662    } 
    663663 
    664     dtvmultiplex_to_dtvproperties(card_type, tuning, &cmds); 
     664    if (!dtvmultiplex_to_dtvproperties(card_type, tuning, &cmds) || 
     665        cmds.num<2) 
     666       return false; 
    665667 
    666668    bool is_dvbs = (DTVTunerType::kTunerTypeQPSK   == card_type || 
    667669                    DTVTunerType::kTunerTypeDVB_S2 == card_type); 
     
    747749 
    748750    if (reset || !prev_tuning.IsEqual(card_type, tuning, 500 * freq_mult)) 
    749751    { 
    750         VERBOSE(VB_CHANNEL, LOC + "Tune(): Tuning ..."); 
     752        VERBOSE(VB_CHANNEL, LOC + QString("Tune(): Tuning with %1 properties...").arg(cmds.num)); 
    751753        if (ioctl(fd_frontend, FE_SET_PROPERTY, &cmds) < 0) 
    752754        { 
    753755            VERBOSE(VB_IMPORTANT, LOC_ERR + "Tune(): " + 
     
    13221324    else 
    13231325    { 
    13241326        VERBOSE(VB_IMPORTANT, "Unknown tuner type." + ENO); 
     1327        return false; 
    13251328    } 
    13261329   return true; 
    13271330}