From 6d67b5263f505a8d23b2d4b92f05384baead4a22 Mon Sep 17 00:00:00 2001 From: Philippe Normand Date: Thu, 18 Sep 2014 18:16:59 +0200 Subject: [PATCH] hlsdemux: lock client mutex before entering the retry_failover block This is consistent with the case where the block execution is triggered by the goto invoked after the current_variant update. https://bugzilla.gnome.org/show_bug.cgi?id=736919 --- ext/hls/gsthlsdemux.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/hls/gsthlsdemux.c b/ext/hls/gsthlsdemux.c index b91c6cb708..e32858b4c2 100644 --- a/ext/hls/gsthlsdemux.c +++ b/ext/hls/gsthlsdemux.c @@ -1746,12 +1746,15 @@ gst_hls_demux_change_playlist (GstHLSDemux * demux, guint max_bitrate) current_variant = gst_m3u8_client_get_playlist_for_bitrate (demux->client, max_bitrate); + GST_M3U8_CLIENT_LOCK (demux->client); + retry_failover_protection: old_bandwidth = GST_M3U8 (previous_variant->data)->bandwidth; new_bandwidth = GST_M3U8 (current_variant->data)->bandwidth; /* Don't do anything else if the playlist is the same */ if (new_bandwidth == old_bandwidth) { + GST_M3U8_CLIENT_UNLOCK (demux->client); return TRUE; }