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
This commit is contained in:
Philippe Normand 2014-09-18 18:16:59 +02:00 committed by Tim-Philipp Müller
parent e289ab07c1
commit 6d67b5263f

View file

@ -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;
}