vlc | branch: master | Zhao Zhili <[email protected]> | Thu Nov  7 
21:58:14 2019 +0800| [55a3b5583c7e300481ae9e92cd06443b3ebd2570] | committer: 
Thomas Guillem

audiotrack: check vlc_cond_timedwait return value against 0

Documentation of the API doesn't guarantee any particular error code.

Suggested by Thomas Guillem

Signed-off-by: Thomas Guillem <[email protected]>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=55a3b5583c7e300481ae9e92cd06443b3ebd2570
---

 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 );

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to