[vlc-devel] [PATCH] demux: adaptive: fix inverted logic and don't do wait in a loop
Zhao Zhili
wantlamy at gmail.com
Wed Jul 26 17:08:21 CEST 2017
On Wed, Jul 26, 2017 at 10:38 PM, Rémi Denis-Courmont <remi at remlab.net>
wrote:
> Le keskiviikkona 26. heinäkuuta 2017, 19.43.34 EEST Zhao Zhili a écrit :
> > ---
> > modules/demux/adaptive/PlaylistManager.cpp | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/modules/demux/adaptive/PlaylistManager.cpp
> > b/modules/demux/adaptive/PlaylistManager.cpp
> > index f560d0f..f489a18f 100644
> > --- a/modules/demux/adaptive/PlaylistManager.cpp
> > +++ b/modules/demux/adaptive/PlaylistManager.cpp
> > @@ -664,8 +664,7 @@ void PlaylistManager::Run()
> > vlc_mutex_unlock(&demux.lock);
> >
> > mutex_cleanup_push(&lock);
> > - while(vlc_cond_timedwait(&waitcond, &lock, i_deadline) == 0
> > - && i_deadline < mdate());
> > + vlc_cond_timedwait(&waitcond, &lock, i_deadline);
> > vlc_cleanup_pop();
> > }
> > }
>
> The existing code is an obtuse and inefficient emulation of mwait(). It
> does
> not make much sense. But the patch is also wrong due to spurious wake-ups.
>
>
I think it's more similar to ControlPop() than mwait().
> --
> 雷米‧德尼-库尔蒙
> https://www.remlab.net/
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170726/0e228066/attachment.html>
More information about the vlc-devel
mailing list