case STREAM_TYPE_AUDIO_AC3:
static void pmt_cb(void *opaque, const uint8_t *section, int section_len){    MpegTSContext *ts = opaque;    SectionHeader h1, *h = &h1;    const uint8_t *p, *p_end;    int program_info_length, pcr_pid, pid, stream_type, desc_length;    #ifdef DEBUG_SI    printf("PMT:\n");    av_hex_dump((uint8_t *)section, section_len);#endif    p_end = section + section_len - 4;    p = section;    if (parse_section_header(h, &p, p_end) < 0)        return;#ifdef DEBUG_SI    printf("sid=0x%x sec_num=%d/%d\n", h->id, h->sec_num, h->last_sec_num);#endif    if (h->tid != PMT_TID || (ts->req_sid >= 0 && h->id != ts->req_sid) )        return;    pcr_pid = get16(&p, p_end) & 0x1fff;    if (pcr_pid < 0)        return;#ifdef DEBUG_SI    printf("pcr_pid=0x%x\n", pcr_pid);#endif    program_info_length = get16(&p, p_end) & 0xfff;    if (program_info_length < 0)        return;    p += program_info_length;    if (p >= p_end)        return;    for(;;) {        stream_type = get8(&p, p_end);        if (stream_type < 0)            break;        pid = get16(&p, p_end) & 0x1fff;        if (pid < 0)            break;        desc_length = get16(&p, p_end) & 0xfff;        if (desc_length < 0)            break;        p += desc_length;        if (p > p_end)            return;#ifdef DEBUG_SI        printf("stream_type=%d pid=0x%x\n", stream_type, pid);#endif        /* now create ffmpeg stream */        switch(stream_type) {        case STREAM_TYPE_AUDIO_MPEG1:        case STREAM_TYPE_AUDIO_MPEG2:        case STREAM_TYPE_VIDEO_MPEG1:        case STREAM_TYPE_VIDEO_MPEG2:            add_pes_stream(ts->stream, pid);            break;        default:            /* we ignore the other streams */            break;        }    }    /* all parameters are there */    ts->set_service_cb(ts->set_service_opaque, 0);    mpegts_close_filter(ts, ts->pmt_filter);    ts->pmt_filter = NULL;}