Ticket #1485: use-centre-freq.diff

File use-centre-freq.diff, 1.2 KB (added by Stuart Auchterlonie, 15 years ago)

use's the centre freq from the NIT if there are no other_freq

  • libs/libmythtv/channelutil.cpp

    old new  
    7474            .arg(frequency).arg(modulation));
    7575
    7676    // If transport is already present, skip insert
    77     uint mplex = get_dtv_multiplex(
     77    int mplex = get_dtv_multiplex(
    7878        db_source_id,  sistandard,    frequency,
    7979        // DVB specific
    8080        transport_id,  network_id);
     
    189189        if (cd.OtherFrequencyInUse())
    190190        {
    191191            QString modulation;
    192             uint mux = ChannelUtil::GetMplexID(sourceid, tsid, netid);
    193             freq     = ChannelUtil::GetTuningParams(mux, modulation);
     192            int mux = ChannelUtil::GetMplexID(sourceid, tsid, netid);
     193            if (mux != -1)
     194                freq = ChannelUtil::GetTuningParams(mux, modulation);
    194195        }
    195196
    196         uint mux = ChannelUtil::CreateMultiplex(
     197        int mux = ChannelUtil::CreateMultiplex(
    197198            sourceid,            "dvb",
    198199            freq,                 QString::null,
    199200            // DVB specific