Commit 9bb4ee15 authored by Jean-Paul Saman's avatar Jean-Paul Saman

asi: call asi_Reset() on transport errors iso dvb_Reset()

The demuxer calls dvb_Reset() even when reading from an ASI device. The
dvb_Reset() tried to retune using FrontendSet() that issues an IOCTL FE_GET_INFO.
When reading from an ASI card there is no such IOCTL. This patch adds an pf_Reset
that makes sure the proper reset code for current device is called.
parent 39bb544c
......@@ -164,6 +164,14 @@ void asi_Open( void )
fsync( i_handle );
}
/*****************************************************************************
* asi_Reset
*****************************************************************************/
void asi_Reset( void )
{
msg_Warn( NULL, "asi_Reset() do nothing" );
}
/*****************************************************************************
* asi_Read : read packets from the device
*****************************************************************************/
......
......@@ -200,7 +200,7 @@ static void demux_Handle( block_t *p_ts )
i_nb_errors = 0;
msg_Warn( NULL,
"too many transport errors, tuning again" );
dvb_Reset();
pf_Reset();
}
if ( p_pids[i_pid].i_refcount )
......
......@@ -76,6 +76,7 @@ int b_src_rawudp = 0;
int i_asi_adapter = 0;
void (*pf_Open)( void ) = NULL;
void (*pf_Reset)( void ) = NULL;
block_t * (*pf_Read)( mtime_t i_poll_timeout ) = NULL;
int (*pf_SetFilter)( uint16_t i_pid ) = NULL;
void (*pf_UnsetFilter)( int i_fd, uint16_t i_pid ) = NULL;
......@@ -478,6 +479,7 @@ int main( int i_argc, char **pp_argv )
if ( pf_Open != NULL )
usage();
pf_Open = dvb_Open;
pf_Reset = dvb_Reset;
pf_Read = dvb_Read;
pf_SetFilter = dvb_SetFilter;
pf_UnsetFilter = dvb_UnsetFilter;
......@@ -635,6 +637,7 @@ int main( int i_argc, char **pp_argv )
}
pf_Open = udp_Open;
pf_Open = dvb_Reset;
pf_Read = udp_Read;
pf_SetFilter = udp_SetFilter;
pf_UnsetFilter = udp_UnsetFilter;
......@@ -665,6 +668,7 @@ int main( int i_argc, char **pp_argv )
usage();
}
pf_Open = asi_Open;
pf_Reset = asi_Reset;
pf_Read = asi_Read;
pf_SetFilter = asi_SetFilter;
pf_UnsetFilter = asi_UnsetFilter;
......
......@@ -139,6 +139,7 @@ extern int b_src_rawudp;
extern int i_asi_adapter;
extern void (*pf_Open)( void );
extern void (*pf_Reset)( void );
extern block_t * (*pf_Read)( mtime_t i_poll_timeout );
extern int (*pf_SetFilter)( uint16_t i_pid );
extern void (*pf_UnsetFilter)( int i_fd, uint16_t i_pid );
......@@ -176,6 +177,7 @@ int udp_SetFilter( uint16_t i_pid );
void udp_UnsetFilter( int i_fd, uint16_t i_pid );
void asi_Open( void );
void asi_Reset( void );
block_t * asi_Read( mtime_t i_poll_timeout );
int asi_SetFilter( uint16_t i_pid );
void asi_UnsetFilter( int i_fd, uint16_t i_pid );
......
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