Ticket #3695: freebox.h264.patch

File freebox.h264.patch, 1.0 KB (added by mythtv@…, 17 years ago)
  • libs/libmythtv/freeboxrecorder.cpp

     
    218218        // Pass or reject packets based on PID, and parse info from them
    219219        if (lpid == _stream_data->VideoPIDSingleProgram())
    220220        {
     221          ProgramMapTable *pmt = _stream_data->PMTSingleProgram();
     222          uint video_stream_type = pmt->StreamType(pmt->FindPID(lpid));
     223
     224          if (video_stream_type == StreamID::H264Video)
     225            _buffer_packets = !FindH264Keyframes(&tspacket);
     226          else if (StreamID::IsVideo(video_stream_type))
    221227            _buffer_packets = !FindMPEG2Keyframes(&tspacket);
    222             BufferedWrite(tspacket);
     228
     229          if ((video_stream_type != StreamID::H264Video) || _seen_sps)
     230            BufferedWrite(tspacket);           
    223231        }
    224232        else if (_stream_data->IsAudioPID(lpid))
    225233            BufferedWrite(tspacket);