[vlc-commits] stream_filter/httplive.c: Modify backoff algorithm

Jean-Paul Saman git at videolan.org
Mon Oct 10 14:30:01 CEST 2011


vlc | branch: master | Jean-Paul Saman <jean-paul.saman at m2x.nl> | Wed Sep 21 16:23:51 2011 +0200| [85dcda0f9a36c9d9614c92aecdd13b49147d9a5d] | committer: Jean-Paul Saman

stream_filter/httplive.c: Modify backoff algorithm

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=85dcda0f9a36c9d9614c92aecdd13b49147d9a5d
---

 modules/stream_filter/httplive.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c
index 489a359..e809a7b 100644
--- a/modules/stream_filter/httplive.c
+++ b/modules/stream_filter/httplive.c
@@ -1268,9 +1268,9 @@ static void* hls_Reload(void *p_this)
 
     int canc = vlc_savecancel();
 
+    double wait = 0.5;
     while (vlc_object_alive(s))
     {
-        double wait = 1;
         mtime_t now = mdate();
         if (now >= p_sys->playlist.wakeup)
         {
@@ -1283,7 +1283,11 @@ static void* hls_Reload(void *p_this)
                 else if (p_sys->playlist.tries == 2) wait = 1;
                 else if (p_sys->playlist.tries >= 3) wait = 3;
             }
-            else p_sys->playlist.tries = 0;
+            else
+            {
+                p_sys->playlist.tries = 0;
+                wait = 0.5;
+            }
 
             hls_stream_t *hls = hls_Get(p_sys->hls_stream, p_sys->download.stream);
             assert(hls);



More information about the vlc-commits mailing list