Ticket #1485: use-correct-frequency.2.diff

File use-correct-frequency.2.diff, 1.4 KB (added by Stuart Auchterlonie, 18 years ago)

replaces use-centre-freq.diff, corrects other_freq handling

  • 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);
     
    186186
    187187        // Use the frequency we already have for this mplex
    188188        // as it may be one of the other_frequencies for this mplex
    189         if (cd.OtherFrequencyInUse())
    190         {
    191             QString modulation;
    192             uint mux = ChannelUtil::GetMplexID(sourceid, tsid, netid);
    193             freq     = ChannelUtil::GetTuningParams(mux, modulation);
    194         }
     189        QString modulation;
     190        int mux = ChannelUtil::GetMplexID(sourceid, tsid, netid);
     191        if (mux != -1)
     192            freq = ChannelUtil::GetTuningParams(mux, modulation);
    195193
    196         uint mux = ChannelUtil::CreateMultiplex(
     194        int mux = ChannelUtil::CreateMultiplex(
    197195            sourceid,            "dvb",
    198196            freq,                 QString::null,
    199197            // DVB specific