Commit f447c22a authored by Marian Ďurkovič's avatar Marian Ďurkovič Committed by Christophe Massiot

* dvb.c: Simplify dvb_Open()

parent 2ad3ef07
...@@ -89,19 +89,13 @@ void dvb_Open( void ) ...@@ -89,19 +89,13 @@ void dvb_Open( void )
sprintf( psz_tmp, "/dev/dvb/adapter%d/dvr%d", i_adapter, i_fenum ); sprintf( psz_tmp, "/dev/dvb/adapter%d/dvr%d", i_adapter, i_fenum );
if( (i_dvr = open(psz_tmp, O_RDONLY)) < 0 ) if( (i_dvr = open(psz_tmp, O_RDONLY | O_NONBLOCK)) < 0 )
{ {
msg_Err( NULL, "opening device %s failed (%s)", psz_tmp, msg_Err( NULL, "opening device %s failed (%s)", psz_tmp,
strerror(errno) ); strerror(errno) );
exit(1); exit(1);
} }
if( fcntl( i_dvr, F_SETFL, O_NONBLOCK ) == -1 )
{
msg_Warn( NULL, "couldn't set %s non-blocking mode (%s)", psz_tmp,
strerror(errno) );
}
if ( ioctl( i_dvr, DMX_SET_BUFFER_SIZE, DVR_BUFFER_SIZE ) < 0 ) if ( ioctl( i_dvr, DMX_SET_BUFFER_SIZE, DVR_BUFFER_SIZE ) < 0 )
{ {
msg_Warn( NULL, "couldn't set %s buffer size (%s)", psz_tmp, msg_Warn( NULL, "couldn't set %s buffer size (%s)", psz_tmp,
......
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