[vlc-devel] [PATCH] demux: adaptive: signal buffering state change in both cases
Zhao Zhili
wantlamy at gmail.com
Mon Jul 31 03:31:03 CEST 2017
Ping...
On Fri, Jul 28, 2017 at 4:49 PM, Zhao Zhili <wantlamy at gmail.com> wrote:
> ---
> modules/demux/adaptive/PlaylistManager.cpp | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/modules/demux/adaptive/PlaylistManager.cpp
> b/modules/demux/adaptive/PlaylistManager.cpp
> index 771fdfa..39b2ec8 100644
> --- a/modules/demux/adaptive/PlaylistManager.cpp
> +++ b/modules/demux/adaptive/PlaylistManager.cpp
> @@ -614,8 +614,7 @@ void PlaylistManager::setBufferingRunState(bool b)
> {
> vlc_mutex_lock(&lock);
> b_buffering = b;
> - if(b_buffering)
> - vlc_cond_signal(&waitcond);
> + vlc_cond_signal(&waitcond);
> vlc_mutex_unlock(&lock);
> }
>
> @@ -665,8 +664,9 @@ void PlaylistManager::Run()
> vlc_mutex_unlock(&demux.lock);
>
> mutex_cleanup_push(&lock);
> - while(vlc_cond_timedwait(&waitcond, &lock, i_deadline) == 0
> - && i_deadline < mdate());
> + while(b_buffering &&
> + vlc_cond_timedwait(&waitcond, &lock, i_deadline) == 0
> &&
> + i_deadline > mdate());
> vlc_cleanup_pop();
> }
> }
> --
> 2.7.4
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170731/5f0ce75d/attachment.html>
More information about the vlc-devel
mailing list