diff options
author | Mike Lampard <mlampard@users.sourceforge.net> | 2004-10-23 01:26:38 +0000 |
---|---|---|
committer | Mike Lampard <mlampard@users.sourceforge.net> | 2004-10-23 01:26:38 +0000 |
commit | f3bad6076baeaaf92f460b8a6f71e6f6d3c78515 (patch) | |
tree | 99ddf124eb6759d917ce6d6d906539cb45cba221 | |
parent | 704d6e91db93a5efb1d0aca97ea5a422a1b5f3e4 (diff) | |
download | xine-lib-f3bad6076baeaaf92f460b8a6f71e6f6d3c78515.tar.gz xine-lib-f3bad6076baeaaf92f460b8a6f71e6f6d3c78515.tar.bz2 |
revert to old behaviour on pat/pmt timeout + bugfix
CVS patchset: 7068
CVS date: 2004/10/23 01:26:38
-rw-r--r-- | src/input/input_dvb.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c index 61da791af..60c8f23ca 100644 --- a/src/input/input_dvb.c +++ b/src/input/input_dvb.c @@ -873,7 +873,13 @@ static void dvb_parse_si(dvb_input_plugin_t *this) { /* first - the PAT */ dvb_set_pidfilter (this, INTERNAL_FILTER, 0, DMX_PES_OTHER, DMX_OUT_TAP); - poll(&pfd,1,1500); + /* wait for up to 1.5 seconds */ + if(poll(&pfd,1,1500)<1) /* PAT timed out - weird, but we'll default to using channels.conf info */ + { + dvb_set_pidfilter (this,VIDFILTER,this->channels[this->channel].pid[VIDFILTER], DMX_PES_OTHER, DMX_OUT_TS_TAP); + dvb_set_pidfilter (this,AUDFILTER,this->channels[this->channel].pid[AUDFILTER], DMX_PES_OTHER, DMX_OUT_TS_TAP); + return; + } result = read (tuner->fd_pidfilter[INTERNAL_FILTER], tmpbuffer, 3); if(result!=3) printf("error\n"); @@ -904,7 +910,12 @@ static void dvb_parse_si(dvb_input_plugin_t *this) { bufptr = tmpbuffer; /* next - the PMT */ dvb_set_pidfilter(this, INTERNAL_FILTER, this->channels[this->channel].pmtpid , DMX_PES_OTHER, DMX_OUT_TAP); - poll(&pfd,1,1500); + if(poll(&pfd,1,1500)<1) /* PMT timed out - weird, but we'll default to using channels.conf info */ + { + dvb_set_pidfilter (this,VIDFILTER,this->channels[this->channel].pid[VIDFILTER], DMX_PES_OTHER, DMX_OUT_TS_TAP); + dvb_set_pidfilter (this,AUDFILTER,this->channels[this->channel].pid[AUDFILTER], DMX_PES_OTHER, DMX_OUT_TS_TAP); + return; + } result = read(tuner->fd_pidfilter[INTERNAL_FILTER],tmpbuffer,3); section_len = getbits (bufptr, 12, 12); @@ -980,7 +991,7 @@ static void do_eit(dvb_input_plugin_t *this) for(loops=0;loops<=this->num_streams_in_this_ts*2;loops++){ eit=foo; - if (poll(&fd,1,2000)<0) { + if (poll(&fd,1,2000)<1) { printf("(TImeout in EPG loop!! Quitting\n"); return; } |