Commit eb72bd56 authored by Damien Fouilleul's avatar Damien Fouilleul

- control/input.c: don't rely on exceptions to control the state of API...

- control/input.c: don't rely on exceptions to control the state of API internal logic as these are optional
parent ef7c7e95
......@@ -64,7 +64,7 @@ vlc_int64_t libvlc_input_get_length( libvlc_input_t *p_input,
vlc_value_t val;
p_input_thread = libvlc_get_input_thread ( p_input, p_e);
if( libvlc_exception_raised( p_e ) )
if( !p_input_thread )
return -1;
var_Get( p_input_thread, "length", &val );
......@@ -80,7 +80,7 @@ vlc_int64_t libvlc_input_get_time( libvlc_input_t *p_input,
vlc_value_t val;
p_input_thread = libvlc_get_input_thread ( p_input, p_e );
if( libvlc_exception_raised( p_e ) )
if( !p_input_thread )
return -1;
var_Get( p_input_thread , "time", &val );
......@@ -95,7 +95,7 @@ void libvlc_input_set_time( libvlc_input_t *p_input, vlc_int64_t time,
vlc_value_t value;
p_input_thread = libvlc_get_input_thread ( p_input, p_e );
if( libvlc_exception_raised( p_e ) )
if( !p_input_thread )
return;
value.i_time = time*1000LL;
......@@ -111,7 +111,7 @@ void libvlc_input_set_position( libvlc_input_t *p_input, float position,
val.f_float = position;
p_input_thread = libvlc_get_input_thread ( p_input, p_e);
if ( libvlc_exception_raised( p_e ) )
if( !p_input_thread )
return;
var_Set( p_input_thread, "position", val );
......@@ -125,7 +125,7 @@ float libvlc_input_get_position( libvlc_input_t *p_input,
vlc_value_t val;
p_input_thread = libvlc_get_input_thread ( p_input, p_e);
if ( libvlc_exception_raised( p_e ) )
if( !p_input_thread )
return -1.0;
var_Get( p_input_thread, "position", &val );
......@@ -141,7 +141,7 @@ float libvlc_input_get_fps( libvlc_input_t *p_input,
input_thread_t *p_input_thread;
p_input_thread = libvlc_get_input_thread ( p_input, p_e );
if ( libvlc_exception_raised( p_e ) )
if( !p_input_thread )
return 0.0;
if( (NULL == p_input_thread->p->input.p_demux)
......@@ -163,7 +163,7 @@ vlc_bool_t libvlc_input_will_play( libvlc_input_t *p_input,
{
input_thread_t *p_input_thread =
libvlc_get_input_thread ( p_input, p_e);
if ( libvlc_exception_raised( p_e ) )
if ( !p_input_thread )
return VLC_FALSE;
if ( !p_input_thread->b_die && !p_input_thread->b_dead )
......@@ -187,7 +187,7 @@ void libvlc_input_set_rate( libvlc_input_t *p_input, float rate,
val.i_int = 1000.0f/rate;
p_input_thread = libvlc_get_input_thread ( p_input, p_e);
if ( libvlc_exception_raised( p_e ) )
if ( !p_input_thread )
return;
var_Set( p_input_thread, "rate", val );
......@@ -201,7 +201,7 @@ float libvlc_input_get_rate( libvlc_input_t *p_input,
vlc_value_t val;
p_input_thread = libvlc_get_input_thread ( p_input, p_e);
if ( libvlc_exception_raised( p_e ) )
if ( !p_input_thread )
return -1.0;
var_Get( p_input_thread, "rate", &val );
......@@ -217,7 +217,7 @@ int libvlc_input_get_state( libvlc_input_t *p_input,
vlc_value_t val;
p_input_thread = libvlc_get_input_thread ( p_input, p_e );
if ( libvlc_exception_raised( p_e ) )
if ( !p_input_thread )
return 0;
var_Get( p_input_thread, "state", &val );
......
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