diff options
author | Jan Schmidt <jan@centricular.com> | 2015-11-08 01:34:30 +1100 |
---|---|---|
committer | Jan Schmidt <jan@centricular.com> | 2015-12-02 22:29:38 +1100 |
commit | 952275ad9952a32101fc6f6ed0a29ec7d2140d0e (patch) | |
tree | 46f53da6f8cecb0c6a2ef632cf03effba567e56a /ext | |
parent | 978bcd7181bf0f282cb17d2f5f6f1ac009508f37 (diff) | |
download | gstreamer-plugins-bad-952275ad9952a32101fc6f6ed0a29ec7d2140d0e.tar.gz |
hlsdemux: When switching bitrate variants, don't jump back
Don't jump backward to 3 files from the end of the playlist
when switching variants - it just means we downloaded
fragments fast and caught up to the end of the playlist.
Disable that by treating a variant switch as a playlist
update, not a restart due to a seek or so.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/hls/gsthlsdemux.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/hls/gsthlsdemux.c b/ext/hls/gsthlsdemux.c index e0562a961..516934de3 100644 --- a/ext/hls/gsthlsdemux.c +++ b/ext/hls/gsthlsdemux.c @@ -943,6 +943,9 @@ retry: target_pos = MAX (target_pos, demux->client->sequence_position); } + GST_LOG_OBJECT (demux, "Looking for sequence position %" + GST_TIME_FORMAT " in updated playlist", GST_TIME_ARGS (target_pos)); + current_pos = 0; for (walk = demux->client->current->files; walk; walk = walk->next) { GstM3U8MediaFile *file = walk->data; @@ -1002,7 +1005,7 @@ retry_failover_protection: GST_INFO_OBJECT (demux, "Client was on %dbps, max allowed is %dbps, switching" " to bitrate %dbps", old_bandwidth, max_bitrate, new_bandwidth); - if (gst_hls_demux_update_playlist (demux, FALSE, NULL)) { + if (gst_hls_demux_update_playlist (demux, TRUE, NULL)) { gchar *uri; gchar *main_uri; uri = gst_m3u8_client_get_current_uri (demux->client); |