Commit 9424fc16 authored by massiot's avatar massiot

* dvb.c: Fix CAM poll timing, patch by Marian Ďurkovič.


git-svn-id: svn://svn.videolan.org/dvblast/trunk@19 55d3f8b6-4a41-4d2d-a900-313d1436a5b8
parent a3478b91
...@@ -119,7 +119,6 @@ block_t *dvb_Read( void ) ...@@ -119,7 +119,6 @@ block_t *dvb_Read( void )
{ {
struct pollfd ufds[3]; struct pollfd ufds[3];
int i_ret, i_nb_fd = 2; int i_ret, i_nb_fd = 2;
mtime_t i_current_date;
memset( ufds, 0, sizeof(ufds) ); memset( ufds, 0, sizeof(ufds) );
ufds[0].fd = i_dvr; ufds[0].fd = i_dvr;
...@@ -141,19 +140,18 @@ block_t *dvb_Read( void ) ...@@ -141,19 +140,18 @@ block_t *dvb_Read( void )
msg_Err( NULL, "poll error: %s", strerror(errno) ); msg_Err( NULL, "poll error: %s", strerror(errno) );
return NULL; return NULL;
} }
i_current_date = mdate();
if ( i_ca_handle && i_ca_type == CA_CI_LINK if ( i_ca_handle && i_ca_type == CA_CI_LINK
&& i_current_date > i_ca_next_event ) && mdate() > i_ca_next_event )
{ {
en50221_Poll(); en50221_Poll();
i_ca_next_event = i_current_date + i_ca_timeout; i_ca_next_event = mdate() + i_ca_timeout;
} }
if ( ufds[1].revents ) if ( ufds[1].revents )
FrontendPoll(); FrontendPoll();
if ( i_frontend_timeout && i_current_date > i_frontend_timeout ) if ( i_frontend_timeout && mdate() > i_frontend_timeout )
{ {
msg_Warn( NULL, "no lock, tuning again" ); msg_Warn( NULL, "no lock, tuning again" );
FrontendSet(); FrontendSet();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment