diff options
author | Oliver Freyermuth <o.freyermuth@googlemail.com> | 2015-01-05 23:46:31 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-01-06 19:52:27 +0100 |
commit | 672b5df411d55e7069cbcd45d9fd513561ed4996 (patch) | |
tree | 18c6db820c83c1231152458fd61df8c59cea62c9 /stream/stream_dvb.c | |
parent | ca32a15a22b3bffa7f62bec81141d96850887fdf (diff) | |
download | mpv-672b5df411d55e7069cbcd45d9fd513561ed4996.tar.bz2 mpv-672b5df411d55e7069cbcd45d9fd513561ed4996.tar.xz |
stream_dvb: Do not add special PIDs if we anyways record the full TP.
This just exchanges two blocks of code: If we record
the full transponder, no need to explicitly add some PIDs to the
filter list.
Diffstat (limited to 'stream/stream_dvb.c')
-rw-r--r-- | stream/stream_dvb.c | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/stream/stream_dvb.c b/stream/stream_dvb.c index a78ccd7eb3..f8122ecd0e 100644 --- a/stream/stream_dvb.c +++ b/stream/stream_dvb.c @@ -369,29 +369,6 @@ static dvb_channels_list *dvb_get_channels(struct mp_log *log, int cfg_full_tran if((fields < 2) || (ptr->pids_cnt <= 0) || (ptr->freq == 0) || (strlen(ptr->name) == 0)) continue; - has8192 = has0 = 0; - for(cnt = 0; cnt < ptr->pids_cnt; cnt++) - { - if(ptr->pids[cnt] == 8192) - has8192 = 1; - if(ptr->pids[cnt] == 0) - has0 = 1; - } - /* 8192 is the pseudo-PID for full TP dump, - enforce that if requested. */ - if (!has8192 && cfg_full_transponder) { - has8192 = 1; - } - if(has8192) { - ptr->pids[0] = 8192; - ptr->pids_cnt = 1; - } - else if(! has0) - { - ptr->pids[ptr->pids_cnt] = 0; //PID 0 is the PAT - ptr->pids_cnt++; - } - /* Add some PIDs which are mandatory in DVB, * and contain human-readable helpful data. */ @@ -414,6 +391,28 @@ static dvb_channels_list *dvb_get_channels(struct mp_log *log, int cfg_full_tran ptr->pids_cnt++; } + has8192 = has0 = 0; + for(cnt = 0; cnt < ptr->pids_cnt; cnt++) + { + if(ptr->pids[cnt] == 8192) + has8192 = 1; + if(ptr->pids[cnt] == 0) + has0 = 1; + } + + /* 8192 is the pseudo-PID for full TP dump, + enforce that if requested. */ + if (!has8192 && cfg_full_transponder) { + has8192 = 1; + } + if (has8192) { + ptr->pids[0] = 8192; + ptr->pids_cnt = 1; + } else if (!has0) { + ptr->pids[ptr->pids_cnt] = 0; //PID 0 is the PAT + ptr->pids_cnt++; + } + mp_verbose(log, " PIDS: "); for(cnt = 0; cnt < ptr->pids_cnt; cnt++) mp_verbose(log, " %d ", ptr->pids[cnt]); |