[vlc-devel] [PATCH 2/9] input: return an error if input_Read() was interrupted

Rémi Denis-Courmont remi at remlab.net
Wed Jun 1 16:20:53 CEST 2016


Le 2016-06-01 13:24, Thomas Guillem a écrit :
> ---
>  src/input/input.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/input/input.c b/src/input/input.c
> index effca97..2f4e18e 100644
> --- a/src/input/input.c
> +++ b/src/input/input.c
> @@ -149,7 +149,8 @@ int input_Read( input_thread_t *p_input, bool
> b_interrupt )
>      if( b_interrupt )
>          vlc_interrupt_set( NULL );
>
> -    return VLC_SUCCESS;
> +    /* Return an error if the input_Read was interrupted */
> +    return input_Stopped( p_input ) ? VLC_EGENERIC : VLC_SUCCESS;
>  }

That looks racy, and if so, you can't rely on it. So I don't really see 
the point.

>
>  input_thread_t *input_CreatePreparser( vlc_object_t *parent,

-- 
Rémi Denis-Courmont
http://www.remlab.net/


More information about the vlc-devel mailing list