[vlc-devel] [PATCH 2/5] adaptive: PlaylistManager: fix spurious condition
Francois Cartegnie
fcvlcdev at free.fr
Sun Nov 1 15:43:28 CET 2020
Le 01/11/2020 à 12:34, Alexandre Janniaux a écrit :
> - if(!b_dead)
> - vlc_cond_timedwait(&demux.cond, &demux.lock, vlc_tick_now() + VLC_TICK_FROM_MS(50));
> + vlc_tick_t deadline = vlc_tick_now() + VLC_TICK_FROM_MS(50);
> + int i_ret = 0;
> + while(!b_dead && i_ret == 0)
> + i_ret = vlc_cond_timedwait(&demux.cond, &demux.lock, deadline);
> vlc_mutex_unlock(&demux.lock);
> return (b_dead || b_all_disabled) ? AbstractStream::status_eof : AbstractStream::status_buffering;
As intended. spurious wake ups are acceptable at this place.
--
Francois Cartegnie
VideoLAN - VLC Developer
More information about the vlc-devel
mailing list