]> git.sesse.net Git - vlc/commitdiff
stream_filter/httplive.c: Modify backoff algorithm
authorJean-Paul Saman <jean-paul.saman@m2x.nl>
Wed, 21 Sep 2011 14:23:51 +0000 (16:23 +0200)
committerJean-Paul Saman <jean-paul.saman@m2x.nl>
Mon, 10 Oct 2011 12:28:13 +0000 (14:28 +0200)
modules/stream_filter/httplive.c

index 489a359d0683990f27f5b5d51e7d9b6545725948..e809a7baab9ba63bf0f217a4402cb4c4eee4c30e 100644 (file)
@@ -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);