[vlc-devel] [PATCH] demux: adaptive: signal buffering state change in both cases
Zhao Zhili
wantlamy at gmail.com
Fri Jul 28 10:49:59 CEST 2017
---
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/20170728/696811ab/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-demux-adaptive-signal-buffering-state-change-in-both.patch
Type: text/x-patch
Size: 1284 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170728/696811ab/attachment.bin>
More information about the vlc-devel
mailing list