[vlc-devel] [PATCH] audiotrack: check vlc_cond_timedwait return value against 0

Thomas Guillem thomas at gllm.fr
Thu Nov 7 16:16:50 CET 2019


Merged, thanks!

On Thu, Nov 7, 2019, at 14:58, quinkblack at foxmail.com wrote:
> From: Zhao Zhili <quinkblack at foxmail.com>
> 
> Documentation of the API doesn't guarantee any particular error code.
> 
> Suggested by Thomas Guillem
> ---
>  modules/audio_output/audiotrack.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/modules/audio_output/audiotrack.c 
> b/modules/audio_output/audiotrack.c
> index 8b153e0ad0..3fcd79c7a5 100644
> --- a/modules/audio_output/audiotrack.c
> +++ b/modules/audio_output/audiotrack.c
> @@ -1804,7 +1804,7 @@ AudioTrack_Thread( void *p_data )
>              /* Don't wake up the thread when there is new data since 
> we are
>               * waiting for more space */
>              p_sys->b_thread_waiting = true;
> -            while( p_sys->b_thread_running && i_ret != ETIMEDOUT )
> +            while( p_sys->b_thread_running && i_ret == 0 )
>                  i_ret = vlc_cond_timedwait( &p_sys->thread_cond,
>                                              &p_sys->lock,
>                                              i_play_deadline );
> -- 
> 2.23.0
> 
> 
> 
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list