Ticket #6612: LiveTV_DTV_ringbuffer_check_debug2.diff

File LiveTV_DTV_ringbuffer_check_debug2.diff, 2.2 KB (added by Shane Shrybman, 11 years ago)

Replaces previous LiveTV_DTV_ringbuffer_check_debug.diff patch

  • mythtv/libs/libmythtv/dvbrecorder.cpp

    bool DVBRecorder::PauseAndWait(int timeout) 
    484484
    485485bool DVBRecorder::ProcessVideoTSPacket(const TSPacket &tspacket)
    486486{
     487    if (!ringBuffer)
     488        return true;
     489
    487490    uint streamType = _stream_id[tspacket.PID()];
    488491
    489492    // Check for keyframes and count frames
    bool DVBRecorder::ProcessVideoTSPacket(const TSPacket &tspacket) 
    503506
    504507bool DVBRecorder::ProcessAudioTSPacket(const TSPacket &tspacket)
    505508{
     509    if (!ringBuffer)
     510    {
     511        VERBOSE(VB_RECORD, LOC + "ProcessAudioTSPacket() no ringBuffer.");
     512        return true;
     513    }
    506514    _buffer_packets = !FindAudioKeyframes(&tspacket);
    507515    return ProcessAVTSPacket(tspacket);
    508516}
    bool DVBRecorder::ProcessAudioTSPacket(const TSPacket &tspacket) 
    510518/// Common code for processing either audio or video packets
    511519bool DVBRecorder::ProcessAVTSPacket(const TSPacket &tspacket)
    512520{
     521    if (!ringBuffer)
     522    {
     523        VERBOSE(VB_RECORD, LOC + "ProcessAVTSPacket() no ringBuffer");
     524        return true;
     525    }
    513526    const uint pid = tspacket.PID();
    514527
    515528    // Check continuity counter
  • mythtv/libs/libmythtv/mpegrecorder.cpp

    bool MpegRecorder::ProcessTSPacket(const TSPacket &tspacket_real) 
    13021302
    13031303bool MpegRecorder::ProcessVideoTSPacket(const TSPacket &tspacket)
    13041304{
     1305    if (!ringBuffer)
     1306        return true;
     1307
    13051308    _buffer_packets = !FindH264Keyframes(&tspacket);
    13061309    if (!_seen_sps)
    13071310        return true;
    bool MpegRecorder::ProcessVideoTSPacket(const TSPacket &tspacket) 
    13111314
    13121315bool MpegRecorder::ProcessAudioTSPacket(const TSPacket &tspacket)
    13131316{
     1317    if (!ringBuffer)
     1318    {
     1319        VERBOSE(VB_RECORD, LOC + "ProcessAudioTSPacket() no ringBuffer.");
     1320        return true;
     1321    }
     1322
    13141323    _buffer_packets = !FindAudioKeyframes(&tspacket);
    13151324    return ProcessAVTSPacket(tspacket);
    13161325}