mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
hlsdemux: fix update interval with respect of the spec
This commit is contained in:
parent
5b23cf694c
commit
99feef2d08
1 changed files with 3 additions and 5 deletions
|
@ -73,8 +73,6 @@ enum
|
||||||
PROP_LAST
|
PROP_LAST
|
||||||
};
|
};
|
||||||
|
|
||||||
static const float update_interval_factor[] = { 1, 0.5, 1.5, 3 };
|
|
||||||
|
|
||||||
#define DEFAULT_FRAGMENTS_CACHE 3
|
#define DEFAULT_FRAGMENTS_CACHE 3
|
||||||
#define DEFAULT_FAILED_COUNT 3
|
#define DEFAULT_FAILED_COUNT 3
|
||||||
#define DEFAULT_BITRATE_LIMIT 0.8
|
#define DEFAULT_BITRATE_LIMIT 0.8
|
||||||
|
@ -1260,10 +1258,10 @@ gst_hls_demux_schedule (GstHLSDemux * demux)
|
||||||
* 0.5 for the first attempt, 1.5 for the second, and 3.0 thereafter."
|
* 0.5 for the first attempt, 1.5 for the second, and 3.0 thereafter."
|
||||||
*/
|
*/
|
||||||
count = demux->client->update_failed_count;
|
count = demux->client->update_failed_count;
|
||||||
if (count < 3)
|
if (count == 0)
|
||||||
update_factor = update_interval_factor[count];
|
update_factor = 1.0;
|
||||||
else
|
else
|
||||||
update_factor = update_interval_factor[3];
|
update_factor = 0.5;
|
||||||
|
|
||||||
/* schedule the next update using the target duration field of the
|
/* schedule the next update using the target duration field of the
|
||||||
* playlist */
|
* playlist */
|
||||||
|
|
Loading…
Reference in a new issue