Ticket #12422: fix_hdpvr_pcr_filter.patch

File fix_hdpvr_pcr_filter.patch, 1.7 KB (added by david.madsen@…, 6 years ago)

Fixes filtering of PCR from HDPVR streams

  • mythtv/libs/libmythtv/recorders/dtvrecorder.cpp

    diff --git a/mythtv/libs/libmythtv/recorders/dtvrecorder.cpp b/mythtv/libs/libmythtv/recorders/dtvrecorder.cpp
    index df05491..ba51887 100644
    a b DTVRecorder::DTVRecorder(TVRec *rec) : 
    9393
    9494    ResetForNewFile();
    9595
     96    _stream_pcrpid = 0;
    9697    memset(_stream_id,  0, sizeof(_stream_id));
    9798    memset(_pid_status, 0, sizeof(_pid_status));
    9899    memset(_continuity_counter, 0xff, sizeof(_continuity_counter));
    void DTVRecorder::HandleSingleProgramPMT(ProgramMapTable *pmt, bool insert) 
    12951296        return;
    12961297    }
    12971298
     1299    _stream_pcrpid = pmt->PCRPID();
     1300
    12981301    // collect stream types for H.264 (MPEG-4 AVC) keyframe detection
    12991302    for (uint i = 0; i < pmt->StreamCount(); ++i)
    13001303        _stream_id[pmt->StreamPID(i)] = pmt->StreamType(i);
    bool DTVRecorder::ProcessTSPacket(const TSPacket &tspacket) 
    13361339        FindOtherKeyframes(&tspacket);
    13371340        _buffer_packets = false;
    13381341    }
    1339     else if (_stream_id[pid] == 0)
     1342    else if (_stream_id[pid] == 0 &&
     1343             pid != _stream_pcrpid  )
    13401344    {
    13411345        // Ignore this packet if the PID should be stripped
    13421346        return true;
  • mythtv/libs/libmythtv/recorders/dtvrecorder.h

    diff --git a/mythtv/libs/libmythtv/recorders/dtvrecorder.h b/mythtv/libs/libmythtv/recorders/dtvrecorder.h
    index 51cbb0c..2bba967 100644
    a b class DTVRecorder : 
    168168    bool                     _has_no_av;
    169169
    170170    // TS recorder stuff
     171    uint          _stream_pcrpid;
    171172    unsigned char _stream_id[0x1fff + 1];
    172173    unsigned char _pid_status[0x1fff + 1];
    173174    unsigned char _continuity_counter[0x1fff + 1];