hlsdemux: fix update interval with respect of the spec
authorAndoni Morales Alastruey <ylatuya@gmail.com>
Mon, 8 Apr 2013 12:04:10 +0000 (14:04 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Fri, 14 Feb 2014 12:09:33 +0000 (13:09 +0100)
ext/hls/gsthlsdemux.c

index 37b03a89eb887ace294981fbbfba6a3f2f57d160..25d452742d4bde8102077365ebd362786100578b 100644 (file)
@@ -74,8 +74,6 @@ enum
   PROP_LAST
 };
 
-static const float update_interval_factor[] = { 1, 0.5, 1.5, 3 };
-
 #define DEFAULT_FRAGMENTS_CACHE 3
 #define DEFAULT_FAILED_COUNT 3
 #define DEFAULT_BITRATE_LIMIT 0.8
@@ -1191,10 +1189,10 @@ gst_hls_demux_schedule (GstHLSDemux * demux)
    * 0.5 for the first attempt, 1.5 for the second, and 3.0 thereafter."
    */
   count = demux->client->update_failed_count;
-  if (count < 3)
-    update_factor = update_interval_factor[count];
+  if (count == 0)
+    update_factor = 1.0;
   else
-    update_factor = update_interval_factor[3];
+    update_factor = 0.5;
 
   /* schedule the next update using the target duration field of the
    * playlist */