Ticket #7619: t7619_h264_parse_unknown.diff

File t7619_h264_parse_unknown.diff, 960 bytes (added by tralph11@…, 14 years ago)

patch to assume on_frame if h264 packet is unidentified

  • libs/libmythtv/avformatdecoder.cpp

     
    26342634    const uint8_t  *buf     = pkt->data;
    26352635    const uint8_t  *buf_end = pkt->data + pkt->size;
    26362636    bool on_frame = false;
     2637    bool state_changed = false;
    26372638
    26382639    // crude NAL unit vs Annex B detection.
    26392640    // the parser only understands Annex B
     
    26592660
    26602661        if (m_h264_parser->stateChanged())
    26612662        {
     2663            state_changed = true;
    26622664            if (m_h264_parser->FieldType() != H264Parser::FIELD_BOTTOM)
    26632665            {
    26642666                if (m_h264_parser->onFrameStart())
     
    27252727        pkt->flags |= PKT_FLAG_KEY;
    27262728    }
    27272729
    2728     return on_frame;
     2730    return on_frame || !state_changed;
    27292731}
    27302732
    27312733/** \fn AvFormatDecoder::ProcessVBIDataPacket(const AVStream*, const AVPacket*)