Changeset 11526


Ignore:
Timestamp:
06/29/19 14:02:07 (14 months ago)
Author:
nautilus7
Message:

[dvbapi] When parsing PAT, save found PMT pid in the demuxer

This way we can later start the PMT filter without explicitly passing the PMT pid.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/module-dvbapi.c

    r11525 r11526  
    17771777}
    17781778
    1779 void dvbapi_start_pmt_filter(int32_t demux_id, int32_t pmt_pid)
     1779void dvbapi_start_pmt_filter(int32_t demux_id)
    17801780{
    17811781#if defined(WITH_COOLAPI) || defined(WITH_COOLAPI2)
     
    17871787    memset(filter, 0, 16);
    17881788    memset(mask, 0, 16);
     1789
    17891790    filter[0] = 0x02;
    17901791    i2b_buf(2, demux[demux_id].program_number, filter + 1); // add srvid to filter since the pid can deliver pmt for multiple srvid
     
    17921793    mask[1] = 0xFF;
    17931794    mask[2] = 0xFF;
    1794     dvbapi_set_filter(demux_id, selected_api, pmt_pid, 0x001, 0x01, filter, mask, 0, 0, TYPE_PMT, 0);
     1795
     1796    dvbapi_set_filter(demux_id, selected_api, demux[demux_id].pmtpid, 0x001, 0x01, filter, mask, 0, 0, TYPE_PMT, 0);
    17951797}
    17961798
     
    41764178
    41774179                    // free demuxer found, start pat/pmt filter for this new demuxer
    4178                     if(pmtpid)
    4179                     {
    4180                         dvbapi_start_pmt_filter(demux_id, pmtpid);
     4180                    if(demux[demux_id].pmtpid)
     4181                    {
     4182                        dvbapi_start_pmt_filter(demux_id);
    41814183                    }
    41824184                    else
     
    49794981    uint16_t srvid;
    49804982    uint32_t i;
     4983
    49814984    dvbapi_stop_filter(demux_id, TYPE_PAT, msgid);
    49824985
     
    49914994        if(demux[demux_id].program_number == srvid)
    49924995        {
    4993             dvbapi_start_pmt_filter(demux_id, b2i(2, buffer + i + 2) & 0x1FFF);
     4996            demux[demux_id].pmtpid = b2i(2, buffer + i + 2) & 0x1FFF;
     4997            dvbapi_start_pmt_filter(demux_id);
    49944998            break;
    49954999        }
Note: See TracChangeset for help on using the changeset viewer.