Example #1
0
static void 
handle_ts(Mpegts *ts, uint8_t *pkt) {
  uint16_t pid = ((pkt[1] & 0x1F) << 8) | pkt[2];
  fprintf(stderr, "%02x,%02x,%02x  pid %d (pmt = %d)\r\n", pkt[0], pkt[1], pkt[2], pid, ts->pmt);
  if(pid == 0) handle_pat(ts, pkt);
  if(pid == ts->pmt) handle_pmt(ts, pkt);
}
Example #2
0
static void handle_pat_section(uint16_t i_pid, uint8_t *p_section)
{
    if (i_pid != PAT_PID || !pat_validate(p_section)) {
            printf("<ERROR type=\"invalid_pat_section\"/>\n");
        free(p_section);
        return;
    }

    if (!psi_table_section(pp_next_pat_sections, p_section))
        return;

    handle_pat();
}