Commit ebfd5297 authored by md's avatar md

* dvb.c: Simplify dvb_Open()


git-svn-id: svn://svn.videolan.org/dvblast/trunk@92 55d3f8b6-4a41-4d2d-a900-313d1436a5b8
parent 4577cdc7
...@@ -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