[vlc-devel] [PATCH 2/5] adaptive: PlaylistManager: fix spurious condition
Zhao Zhili
quinkblack at foxmail.com
Sun Nov 1 15:19:50 CET 2020
> On Nov 1, 2020, at 7:34 PM, Alexandre Janniaux <ajanni at videolabs.io> wrote:
>
> ---
> modules/demux/adaptive/PlaylistManager.cpp | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/modules/demux/adaptive/PlaylistManager.cpp b/modules/demux/adaptive/PlaylistManager.cpp
> index 447f4b0365..8344de005a 100644
> --- a/modules/demux/adaptive/PlaylistManager.cpp
> +++ b/modules/demux/adaptive/PlaylistManager.cpp
> @@ -445,8 +445,10 @@ int PlaylistManager::doDemux(vlc_tick_t increment)
> b_dead &= !(*it)->isValid();
> b_all_disabled &= (*it)->isDisabled();
> }
> - 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);
Now it's just sleep. It should have a more sensible condition.
> vlc_mutex_unlock(&demux.lock);
> return (b_dead || b_all_disabled) ? AbstractStream::status_eof : AbstractStream::status_buffering;
> }
> --
> 2.29.2
>
> _______________________________________________
> 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