mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
hlsdemux: reflow update_playlist a bit
Reduce indentation by erroring out directly on failure.
This commit is contained in:
parent
8be5551dff
commit
d5e115171b
1 changed files with 50 additions and 50 deletions
|
@ -827,9 +827,15 @@ retry:
|
|||
TRUE, TRUE, TRUE, err);
|
||||
g_free (main_uri);
|
||||
if (download == NULL) {
|
||||
gchar *base_uri;
|
||||
|
||||
g_clear_error (err);
|
||||
if (update && !main_checked
|
||||
&& gst_m3u8_client_has_variant_playlist (demux->client)) {
|
||||
if (!update || main_checked
|
||||
|| !gst_m3u8_client_has_variant_playlist (demux->client)) {
|
||||
g_free (uri);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
main_uri = gst_m3u8_client_get_uri (demux->client);
|
||||
GST_INFO_OBJECT (demux,
|
||||
"Updating playlist %s failed, attempt to refresh variant playlist %s",
|
||||
|
@ -838,8 +844,10 @@ retry:
|
|||
gst_uri_downloader_fetch_uri (adaptive_demux->downloader,
|
||||
main_uri, NULL, TRUE, TRUE, TRUE, NULL);
|
||||
g_free (main_uri);
|
||||
if (download != NULL) {
|
||||
gchar *base_uri;
|
||||
if (download == NULL) {
|
||||
g_free (uri);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
buf = gst_fragment_get_buffer (download);
|
||||
playlist = gst_hls_src_buf_to_utf8_playlist (buf);
|
||||
|
@ -873,14 +881,6 @@ retry:
|
|||
|
||||
main_checked = TRUE;
|
||||
goto retry;
|
||||
} else {
|
||||
g_free (uri);
|
||||
return FALSE;
|
||||
}
|
||||
} else {
|
||||
g_free (uri);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
g_free (uri);
|
||||
|
||||
|
|
Loading…
Reference in a new issue