Changeset 11203
- Timestamp:
- 12/28/15 23:34:06 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/module-dvbapi.c
r11202 r11203 1773 1773 { 1774 1774 int32_t i, currentfd; 1775 uint16_t streampid = demux[demux_id].STREAMpids[num]; 1775 1776 ca_index_t newidx = 0, curidx; 1777 ca_pid_t ca_pid2; 1776 1778 1777 1779 if(demux[demux_id].pidindex == -1 && enable) return; // no current pid on enable? --> exit … … 1782 1784 case STAPI: 1783 1785 if(!enable) idx = INDEX_INVALID; 1784 stapi_set_pid(demux_id, num, idx, demux[demux_id].STREAMpids[num], demux[demux_id].pmt_file); // only used to disable pids!!!1786 stapi_set_pid(demux_id, num, idx, streampid, demux[demux_id].pmt_file); // only used to disable pids!!! 1785 1787 break; 1786 1788 #endif … … 1797 1799 uint32_t action = 0; 1798 1800 if(enable){ 1799 action = update_streampid_list(i, demux[demux_id].STREAMpids[num], curidx, use_des);1801 action = update_streampid_list(i, streampid, curidx, use_des); 1800 1802 } 1801 1803 if(!enable){ 1802 action = remove_streampid_from_list(i, demux[demux_id].STREAMpids[num], curidx);1804 action = remove_streampid_from_list(i, streampid, curidx); 1803 1805 } 1804 1806 1805 1807 if(action != NO_STREAMPID_LISTED && action != INVALID_STREAMPID_INDEX && action != FOUND_STREAMPID_INDEX && action != ADDED_STREAMPID_INDEX && action != REMOVED_STREAMPID_INDEX) 1806 { 1807 ca_pid_t ca_pid2; 1808 memset(&ca_pid2, 0, sizeof(ca_pid2)); 1809 ca_pid2.pid = demux[demux_id].STREAMpids[num]; 1810 1808 { 1811 1809 // removed last of this streampid on ca? -> disable this pid with -1 on this ca 1812 if((action == REMOVED_STREAMPID_LASTINDEX || action == FIRST_STREAMPID_INDEX) && (is_ca_used(i, ca_pid2.pid) == INDEX_INVALID)) curidx = DVBAPI_INDEX_DISABLE;1810 if((action == REMOVED_STREAMPID_LASTINDEX || action == FIRST_STREAMPID_INDEX) && (is_ca_used(i, streampid) == INDEX_INVALID)) curidx = DVBAPI_INDEX_DISABLE; 1813 1811 1814 1812 // removed index of streampid that is used to decode on ca -> get a fresh one 1815 1813 if(action == REMOVED_DECODING_STREAMPID_INDEX || action == FIRST_STREAMPID_INDEX) 1816 1814 { 1817 newidx = is_ca_used(i, demux[demux_id].STREAMpids[num]); // get an active index for this pid and enable it on ca device1815 newidx = is_ca_used(i, streampid); // get an active index for this pid and enable it on ca device 1818 1816 curidx = DVBAPI_INDEX_DISABLE; 1819 1817 } … … 1821 1819 while (curidx != INDEX_INVALID || newidx != INDEX_INVALID) 1822 1820 { 1821 memset(&ca_pid2, 0, sizeof(ca_pid2)); 1822 ca_pid2.pid = streampid; 1823 1823 1824 if(curidx != INDEX_INVALID) 1824 1825 {
Note:
See TracChangeset
for help on using the changeset viewer.