Mercurial > mplayer.hg
comparison stream/stream_dvb.c @ 21033:087cad309e9c
if in the list of pids appears at least one 8192 (while TS) remove all other pid filters
and don't add pid 0, either
author | nicodvb |
---|---|
date | Sun, 19 Nov 2006 12:05:11 +0000 |
parents | 89b78ea6bc70 |
children | 5357da9f0690 |
comparison
equal
deleted
inserted
replaced
21032:ddc587b1fd8b | 21033:087cad309e9c |
---|---|
133 dvb_channels_list *list; | 133 dvb_channels_list *list; |
134 FILE *f; | 134 FILE *f; |
135 char line[CHANNEL_LINE_LEN], *colon; | 135 char line[CHANNEL_LINE_LEN], *colon; |
136 | 136 |
137 int fields, cnt, pcnt, k; | 137 int fields, cnt, pcnt, k; |
138 int has8192; | |
138 dvb_channel_t *ptr, *tmp, chn; | 139 dvb_channel_t *ptr, *tmp, chn; |
139 char tmp_lcr[256], tmp_hier[256], inv[256], bw[256], cr[256], mod[256], transm[256], gi[256], vpid_str[256], apid_str[256]; | 140 char tmp_lcr[256], tmp_hier[256], inv[256], bw[256], cr[256], mod[256], transm[256], gi[256], vpid_str[256], apid_str[256]; |
140 const char *cbl_conf = "%d:%255[^:]:%d:%255[^:]:%255[^:]:%255[^:]:%255[^:]\n"; | 141 const char *cbl_conf = "%d:%255[^:]:%d:%255[^:]:%255[^:]:%255[^:]:%255[^:]\n"; |
141 const char *sat_conf = "%d:%c:%d:%d:%255[^:]:%255[^:]\n"; | 142 const char *sat_conf = "%d:%c:%d:%d:%255[^:]:%255[^:]\n"; |
142 const char *ter_conf = "%d:%255[^:]:%255[^:]:%255[^:]:%255[^:]:%255[^:]:%255[^:]:%255[^:]:%255[^:]:%255[^:]:%255[^:]\n"; | 143 const char *ter_conf = "%d:%255[^:]:%255[^:]:%255[^:]:%255[^:]:%255[^:]:%255[^:]:%255[^:]:%255[^:]:%255[^:]:%255[^:]\n"; |
257 } | 258 } |
258 | 259 |
259 if((fields < 2) || (ptr->pids_cnt <= 0) || (ptr->freq == 0) || (strlen(ptr->name) == 0)) | 260 if((fields < 2) || (ptr->pids_cnt <= 0) || (ptr->freq == 0) || (strlen(ptr->name) == 0)) |
260 continue; | 261 continue; |
261 | 262 |
262 | 263 has8192 = 0; |
264 for(cnt = 0; cnt < ptr->pids_cnt; cnt++) | |
265 { | |
266 if(ptr->pids[cnt] == 8192) | |
267 { | |
268 has8192 = 1; | |
269 break; | |
270 } | |
271 } | |
272 if(has8192) | |
273 { | |
274 ptr->pids[0] = 8192; | |
275 ptr->pids_cnt = 1; | |
276 } | |
277 else | |
278 { | |
263 ptr->pids[ptr->pids_cnt] = 0; //PID 0 is the PAT | 279 ptr->pids[ptr->pids_cnt] = 0; //PID 0 is the PAT |
264 ptr->pids_cnt++; | 280 ptr->pids_cnt++; |
281 } | |
265 mp_msg(MSGT_DEMUX, MSGL_V, " PIDS: "); | 282 mp_msg(MSGT_DEMUX, MSGL_V, " PIDS: "); |
266 for(cnt = 0; cnt < ptr->pids_cnt; cnt++) | 283 for(cnt = 0; cnt < ptr->pids_cnt; cnt++) |
267 mp_msg(MSGT_DEMUX, MSGL_V, " %d ", ptr->pids[cnt]); | 284 mp_msg(MSGT_DEMUX, MSGL_V, " %d ", ptr->pids[cnt]); |
268 mp_msg(MSGT_DEMUX, MSGL_V, "\n"); | 285 mp_msg(MSGT_DEMUX, MSGL_V, "\n"); |
269 | 286 |