summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Santos <thiagoss@osg.samsung.com>2015-12-22 10:15:39 -0300
committerThiago Santos <thiagoss@osg.samsung.com>2015-12-22 10:16:16 -0300
commita072101441a648ccd315a3ed8212071404bacc55 (patch)
treed1c5880836e7557271f14fc589b2ac4817d4233a
parent11729cde80df6011f10f685d283405a5c918fa39 (diff)
downloadgstreamer-plugins-bad-a072101441a648ccd315a3ed8212071404bacc55.tar.gz
hlsdemux: make sure every bad update_playlist return sets an error
Otherwise it segfaults when reporting the error in the bus
-rw-r--r--ext/hls/gsthlsdemux.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/hls/gsthlsdemux.c b/ext/hls/gsthlsdemux.c
index 8611e7605..6c5468dee 100644
--- a/ext/hls/gsthlsdemux.c
+++ b/ext/hls/gsthlsdemux.c
@@ -829,20 +829,20 @@ retry:
if (download == NULL) {
gchar *base_uri;
- g_clear_error (err);
if (!update || main_checked
|| !gst_m3u8_client_has_variant_playlist (demux->client)) {
g_free (uri);
return FALSE;
}
+ g_clear_error (err);
main_uri = gst_m3u8_client_get_uri (demux->client);
GST_INFO_OBJECT (demux,
"Updating playlist %s failed, attempt to refresh variant playlist %s",
uri, main_uri);
download =
gst_uri_downloader_fetch_uri (adaptive_demux->downloader,
- main_uri, NULL, TRUE, TRUE, TRUE, NULL);
+ main_uri, NULL, TRUE, TRUE, TRUE, err);
g_free (main_uri);
if (download == NULL) {
g_free (uri);
@@ -858,6 +858,8 @@ retry:
"Failed to validate variant playlist encoding");
g_free (uri);
g_object_unref (download);
+ g_set_error (err, GST_STREAM_ERROR, GST_STREAM_ERROR_WRONG_TYPE,
+ "Couldn't validate playlist encoding");
return FALSE;
}
@@ -874,6 +876,8 @@ retry:
uri, base_uri)) {
GST_WARNING_OBJECT (demux, "Failed to update the variant playlist");
g_object_unref (download);
+ g_set_error (err, GST_STREAM_ERROR, GST_STREAM_ERROR_FAILED,
+ "Couldn't update playlist");
return FALSE;
}