Commit 0125057f authored by Jean-Paul Saman's avatar Jean-Paul Saman Committed by Christophe Massiot

dvb_Reset() hangs DVBlast when using ASI input.

DVBlast hangs when dvb_Reset() in ASI mode. When using ASI as input there is no
need to reset the device and especially resetting a DVB device is wrong. Therefor
abstract the call to dvb_Reset() and replace it with pf_Reset(). Also the udp input
is adapted to provide a function for pf_Reset(). Both asi_Reset() and udp_Reset()
do nothing.
parent 80f523a3
......@@ -277,3 +277,12 @@ void asi_UnsetFilter( int i_fd, uint16_t i_pid )
msg_Warn( NULL, "couldn't remove filter on PID %u", i_pid );
#endif
}
/*****************************************************************************
* asi_Reset
*****************************************************************************/
void asi_Reset( void )
{
msg_Warn( NULL, "asi_Reset() do nothing" );
}
......@@ -250,7 +250,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 ( !ts_get_transporterror( p_ts->p_ts ) )
......
......@@ -102,6 +102,7 @@ static int i_ttl_global = 64;
void (*pf_Open)( void ) = NULL;
block_t * (*pf_Read)( mtime_t i_poll_timeout ) = NULL;
void (*pf_Reset)( void ) = NULL;
int (*pf_SetFilter)( uint16_t i_pid ) = NULL;
void (*pf_UnsetFilter)( int i_fd, uint16_t i_pid ) = NULL;
......@@ -572,6 +573,7 @@ int main( int i_argc, char **pp_argv )
usage();
pf_Open = dvb_Open;
pf_Read = dvb_Read;
pf_Reset = dvb_Reset;
pf_SetFilter = dvb_SetFilter;
pf_UnsetFilter = dvb_UnsetFilter;
break;
......@@ -667,6 +669,7 @@ int main( int i_argc, char **pp_argv )
}
pf_Open = udp_Open;
pf_Read = udp_Read;
pf_Reset = udp_Reset;
pf_SetFilter = udp_SetFilter;
pf_UnsetFilter = udp_UnsetFilter;
break;
......@@ -682,6 +685,7 @@ int main( int i_argc, char **pp_argv )
}
pf_Open = asi_Open;
pf_Read = asi_Read;
pf_Reset = asi_Reset;
pf_SetFilter = asi_SetFilter;
pf_UnsetFilter = asi_UnsetFilter;
break;
......
......@@ -169,6 +169,7 @@ extern enum print_type_t i_print_type;
extern void (*pf_Open)( void );
extern block_t * (*pf_Read)( mtime_t i_poll_timeout );
extern void (*pf_Reset)( void );
extern int (*pf_SetFilter)( uint16_t i_pid );
extern void (*pf_UnsetFilter)( int i_fd, uint16_t i_pid );
......@@ -207,11 +208,13 @@ uint8_t dvb_FrontendStatus( uint8_t *p_answer, ssize_t *pi_size );
void udp_Open( void );
block_t * udp_Read( mtime_t i_poll_timeout );
void udp_Reset( void );
int udp_SetFilter( uint16_t i_pid );
void udp_UnsetFilter( int i_fd, uint16_t i_pid );
void asi_Open( void );
block_t * asi_Read( mtime_t i_poll_timeout );
void asi_Reset( void );
int asi_SetFilter( uint16_t i_pid );
void asi_UnsetFilter( int i_fd, uint16_t i_pid );
......
......@@ -355,3 +355,11 @@ int udp_SetFilter( uint16_t i_pid )
void udp_UnsetFilter( int i_fd, uint16_t i_pid )
{
}
/*****************************************************************************
* udp_Reset:
*****************************************************************************/
void udp_Reset( void )
{
}
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