summaryrefslogtreecommitdiffstats
path: root/stream/stream_dvb.c
diff options
context:
space:
mode:
authornicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-11-19 12:05:11 +0000
committernicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-11-19 12:05:11 +0000
commit88e490defa12980f82e8f3f57cb2808a3ee9292c (patch)
treea5150c80e367bde471dd38a9a48a8ec776136633 /stream/stream_dvb.c
parent5b391eb2a360e0a8c0de22e35929f08c5e6efddb (diff)
downloadmpv-88e490defa12980f82e8f3f57cb2808a3ee9292c.tar.bz2
mpv-88e490defa12980f82e8f3f57cb2808a3ee9292c.tar.xz
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 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21049 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/stream_dvb.c')
-rw-r--r--stream/stream_dvb.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/stream/stream_dvb.c b/stream/stream_dvb.c
index 495fa29054..fd41bec602 100644
--- a/stream/stream_dvb.c
+++ b/stream/stream_dvb.c
@@ -135,6 +135,7 @@ static dvb_channels_list *dvb_get_channels(char *filename, int type)
char line[CHANNEL_LINE_LEN], *colon;
int fields, cnt, pcnt, k;
+ int has8192;
dvb_channel_t *ptr, *tmp, chn;
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];
const char *cbl_conf = "%d:%255[^:]:%d:%255[^:]:%255[^:]:%255[^:]:%255[^:]\n";
@@ -259,9 +260,25 @@ static dvb_channels_list *dvb_get_channels(char *filename, int type)
if((fields < 2) || (ptr->pids_cnt <= 0) || (ptr->freq == 0) || (strlen(ptr->name) == 0))
continue;
-
+ has8192 = 0;
+ for(cnt = 0; cnt < ptr->pids_cnt; cnt++)
+ {
+ if(ptr->pids[cnt] == 8192)
+ {
+ has8192 = 1;
+ break;
+ }
+ }
+ if(has8192)
+ {
+ ptr->pids[0] = 8192;
+ ptr->pids_cnt = 1;
+ }
+ else
+ {
ptr->pids[ptr->pids_cnt] = 0; //PID 0 is the PAT
ptr->pids_cnt++;
+ }
mp_msg(MSGT_DEMUX, MSGL_V, " PIDS: ");
for(cnt = 0; cnt < ptr->pids_cnt; cnt++)
mp_msg(MSGT_DEMUX, MSGL_V, " %d ", ptr->pids[cnt]);