Ticket #3031: 3031-v2.patch

File 3031-v2.patch, 1.2 KB (added by danielk, 6 years ago)

Possible fix (moved the code to catch a similar failure when initially tuning to an MPEG station and switching to a DVB or ATSC channel).

  • libs/libmythtv/tv_rec.cpp

     
    32323232        else 
    32333233            TuningNewRecorder(streamData); 
    32343234 
     3235        // Make sure DTV recorder sees the tables.. 
     3236        if (GetDTVChannel() && GetDTVRecorder()) 
     3237        { 
     3238            DTVChannel *dtvc = GetDTVChannel(); 
     3239            const QString tuningmode = dtvc->GetTuningMode(); 
     3240            MPEGStreamData *sd = GetDTVRecorder()->GetStreamData(); 
     3241 
     3242            if (sd && (tuningmode.left(4) == "atsc")) 
     3243            { 
     3244                ATSCStreamData *asd = dynamic_cast<ATSCStreamData*>(sd); 
     3245                int major = dtvc->GetMajorChannel(); 
     3246                int minor = dtvc->GetMinorChannel(); 
     3247                if (asd && (minor > 0)) 
     3248                    asd->SetDesiredChannel(major, minor); 
     3249            } 
     3250 
     3251            if (sd && (dtvc->GetProgramNumber() >= 0)) 
     3252                sd->SetDesiredProgram(dtvc->GetProgramNumber()); 
     3253        } 
     3254 
    32353255        // If we got this far it is safe to set a new starting channel... 
    32363256        if (channel) 
    32373257            channel->StoreInputChannels();