Ticket #498: scan-dbg.patch

File scan-dbg.patch, 2.2 KB (added by danielk, 20 years ago)

debugging patch

  • libs/libmythtv/mpeg/mpegtables.cpp

     
    7979{
    8080    _ptrs.clear();
    8181    unsigned char *pos =
    82       const_cast<unsigned char*>
     82        const_cast<unsigned char*>
    8383        (pesdata() + PSIP_OFFSET + pmt_header + ProgramInfoLength());
    84     for (unsigned int i=0; pos < pesdata()+Length(); i++) {
     84
     85    for (uint i = 0; pos < pesdata() + Length(); i++)
     86    {
    8587        _ptrs.push_back(pos);
    8688        pos += 5 + StreamInfoLength(i);
    8789    }
    8890    _ptrs.push_back(pos);
     91    VERBOSE(VB_IMPORTANT, "Parsed PMT(0x"<<this<<") "<<this->toString());
    8992}
    9093
    9194void ProgramMapTable::AppendStream(
  • libs/libmythtv/siscan.cpp

     
    373373    }
    374374}
    375375
    376 void SIScan::HandleATSCDBInsertion(const ScanStreamData *sd, bool wait_until_complete)
     376void SIScan::HandleATSCDBInsertion(const ScanStreamData *sd,
     377                                   bool wait_until_complete)
    377378{
    378379    bool hasAll = sd->HasCachedAllVCTs();
    379380    if (wait_until_complete && !hasAll)
     
    979980
    980981    for (uint i = 0; i < pat->ProgramCount(); i++)
    981982    {
    982         const ProgramMapTable *pmt = pmt_map[pat->ProgramNumber(i)];
     983        pmt_map_t::const_iterator it = pmt_map.find(pat->ProgramNumber(i));
     984        if (it == pmt_map.end())
     985        {
     986            VERBOSE(VB_SIPARSER,
     987                   QString("UpdatePATinDB(): PMT for Program #%1 is missing")
     988                   .arg(pat->ProgramNumber(i)));
     989            continue;
     990        }
     991
     992        const ProgramMapTable *pmt = *it;
    983993        VERBOSE(VB_SIPARSER,
    984994                QString("UpdatePATinDB(): Prog %1 PID %2: PMT @")
    985995                .arg(pat->ProgramNumber(i))
     
    989999        // ignore services we have decided to ignore
    9901000        if (!pmt)
    9911001            continue;
     1002        else if (pmt->StreamCount() <= 0)
     1003            continue;
    9921004        else if (ignoreAudioOnlyServices && pmt->IsStillPicture())
    9931005            continue;
    9941006        else if (ignoreEncryptedServices && pmt->IsEncrypted())