Ticket #10080: mythtv-0.25-firewire-h264.patch

File mythtv-0.25-firewire-h264.patch, 1.3 KB (added by theasp@…, 9 years ago)

Patch fixing h264 over firewire for 0.25

  • mythtv/libs/libmythtv/firewirerecorder.cpp

    diff -ruN mythtv-0.25.0~master.20120316.53761e2/mythtv/libs/libmythtv/firewirerecorder.cpp mythtv-0.25.0~master.20120316.53761e2-asp1/mythtv/libs/libmythtv/firewirerecorder.cpp
    old new  
    159159        // Pass or reject packets based on PID, and parse info from them
    160160        if (lpid == GetStreamData()->VideoPIDSingleProgram())
    161161        {
    162             _buffer_packets = !FindMPEG2Keyframes(&tspacket);
    163             BufferedWrite(tspacket);
     162            ProgramMapTable *pmt = _stream_data->PMTSingleProgram();
     163            uint video_stream_type = pmt->StreamType(pmt->FindPID(lpid));
     164
     165            if (video_stream_type == StreamID::H264Video)
     166                _buffer_packets = !FindH264Keyframes(&tspacket);
     167            else if (StreamID::IsVideo(video_stream_type))
     168                _buffer_packets = !FindMPEG2Keyframes(&tspacket);
     169
     170            if ((video_stream_type != StreamID::H264Video) || _seen_sps)
     171                BufferedWrite(tspacket);
    164172        }
    165173        else if (GetStreamData()->IsAudioPID(lpid))
    166174        {