[vlc-commits] demux: adaptive: signal buffering state change in both cases
Zhao Zhili
git at videolan.org
Tue Aug 1 19:40:58 CEST 2017
vlc | branch: master | Zhao Zhili <wantlamy at gmail.com> | Fri Jul 28 16:43:28 2017 +0800| [612174eae43305f0b6a4e694bc8a1cdf99e5cad8] | committer: Francois Cartegnie
demux: adaptive: signal buffering state change in both cases
Signed-off-by: Francois Cartegnie <fcvlcdev at free.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=612174eae43305f0b6a4e694bc8a1cdf99e5cad8
---
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 05acf08978..3ee5014ae0 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();
}
}
More information about the vlc-commits
mailing list