From 905158a055d8020cf6be79a5a9fbfc6979e37639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maro=C5=A1=20Ondr=C3=A1=C5=A1ek?= Date: Wed, 2 Dec 2015 11:01:53 +0100 Subject: [PATCH] hlsdemux: update current variant if connection speed is set If connection speed is set, playlist according to connection speed is selected as current playlist. Problem is that the current variant of main playlist still points to previously set variant. If previously set variant doesn't correspond to current playlist, then it causes unnecessary change of playlist to the same playlist after first fragment is downloaded, because of not updated current variant. To fix this, we need to make sure that current variant of main playlist corresponds to the current playlist https://bugzilla.gnome.org/show_bug.cgi?id=758946 --- ext/hls/gsthlsdemux.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/hls/gsthlsdemux.c b/ext/hls/gsthlsdemux.c index e269f7abc8..4ad87e8763 100644 --- a/ext/hls/gsthlsdemux.c +++ b/ext/hls/gsthlsdemux.c @@ -396,6 +396,9 @@ gst_hls_demux_process_manifest (GstAdaptiveDemux * demux, GstBuffer * buf) } else { GList *tmp = gst_m3u8_client_get_playlist_for_bitrate (hlsdemux->client, demux->connection_speed); + GST_M3U8_CLIENT_LOCK (hlsdemux->client); + hlsdemux->client->main->current_variant = tmp; + GST_M3U8_CLIENT_UNLOCK (hlsdemux->client); child = GST_M3U8 (tmp->data); }