[vlc-devel] [PATCH] HLS: don't signal dl thread out of the blue in Close()

Frédéric Yhuel fyhuel at viotech.net
Tue Jun 19 16:17:55 CEST 2012


---
 modules/stream_filter/httplive.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c
index 5b15bab..5758189 100644
--- a/modules/stream_filter/httplive.c
+++ b/modules/stream_filter/httplive.c
@@ -2000,8 +2000,11 @@ static void Close(vlc_object_t *p_this)
 
     /* */
     vlc_mutex_lock(&p_sys->download.lock_wait);
-    vlc_cond_signal(&p_sys->download.wait);
+    /* negate the condition variable's predicate */
+    p_sys->download.segment = p_sys->playback.segment = 0;
+    p_sys->download.seek = 0; /* better safe than sorry */
     vlc_mutex_unlock(&p_sys->download.lock_wait);
+    vlc_cond_signal(&p_sys->download.wait);
 
     /* */
     if (p_sys->b_live)
-- 
1.7.9.5




More information about the vlc-devel mailing list