* when we reached the end of the playlist */
if (G_UNLIKELY (demux->need_cache)) {
- gboolean ret;
- ret = gst_hls_demux_cache_fragments (demux);
- if (!ret) {
+ if (!gst_hls_demux_cache_fragments (demux))
goto cache_error;
- }
+
/* we can start now the updates thread */
gst_hls_demux_start_update (demux);
GST_INFO_OBJECT (demux, "First fragments cached successfully");
gst_hls_demux_fetch_location (GstHLSDemux * demux, const gchar * uri)
{
GstStateChangeReturn ret;
+ gboolean bret = FALSE;
g_mutex_lock (demux->fetcher_lock);
GST_DEBUG_OBJECT (demux, "Waiting to fetch the URI");
g_cond_wait (demux->fetcher_cond, demux->fetcher_lock);
- if (demux->stopping_fetcher) {
- ret = FALSE;
- goto quit;
- }
-
gst_hls_demux_stop_fetcher (demux, FALSE);
if (demux->downloaded_uri != NULL) {
GST_INFO_OBJECT (demux, "URI fetched successfully");
- ret = TRUE;
- goto quit;
+ bret = TRUE;
}
- ret = FALSE;
goto quit;
uri_error:
GST_ELEMENT_ERROR (demux, RESOURCE, OPEN_READ,
("Could not create an element to fetch the given URI."), ("URI: \"%s\"",
uri));
- ret = FALSE;
+ bret = FALSE;
goto quit;
}
{
GST_ELEMENT_ERROR (demux, CORE, STATE_CHANGE,
("Error changing state of the fetcher element."), NULL);
- ret = FALSE;
+ bret = FALSE;
goto quit;
}
quit:
{
g_mutex_unlock (demux->fetcher_lock);
- return ret;
+ return bret;
}
}