diff options
Diffstat (limited to 'ext/hls/m3u8.c')
-rw-r--r-- | ext/hls/m3u8.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/hls/m3u8.c b/ext/hls/m3u8.c index e21590de..5c7fd174 100644 --- a/ext/hls/m3u8.c +++ b/ext/hls/m3u8.c @@ -65,7 +65,6 @@ gst_m3u8_free (GstM3U8 * self) g_return_if_fail (self != NULL); g_free (self->uri); - g_free (self->allowcache); g_free (self->codecs); g_free (self->key); @@ -299,6 +298,9 @@ gst_m3u8_update (GstM3U8 * self, gchar * data, gboolean * updated) self->files = NULL; } + /* By default, allow caching */ + self->allowcache = TRUE; + list = NULL; duration = 0; title = NULL; @@ -425,12 +427,12 @@ gst_m3u8_update (GstM3U8 * self, gchar * data, gboolean * updated) if (uri[0] == '"') uri += 1; - data = uri_join (self->uri, uri); + uri = uri_join (self->uri, uri); g_free (urip); - if (data == NULL) + if (uri == NULL) continue; - gst_m3u8_set_uri (new_list, data); + gst_m3u8_set_uri (new_list, uri); } } @@ -439,7 +441,6 @@ gst_m3u8_update (GstM3U8 * self, gchar * data, gboolean * updated) (GCompareFunc) _m3u8_compare_uri)) { GST_DEBUG ("Already have a list with this URI"); gst_m3u8_free (new_list); - g_free (data); } else { self->iframe_lists = g_list_append (self->iframe_lists, new_list); } @@ -461,8 +462,7 @@ gst_m3u8_update (GstM3U8 * self, gchar * data, gboolean * updated) /* <YYYY-MM-DDThh:mm:ssZ> */ GST_DEBUG ("FIXME parse date"); } else if (g_str_has_prefix (data, "#EXT-X-ALLOW-CACHE:")) { - g_free (self->allowcache); - self->allowcache = g_strdup (data + 19); + self->allowcache = g_ascii_strcasecmp (data + 19, "YES") == 0; } else if (g_str_has_prefix (data, "#EXT-X-KEY:")) { gchar *v, *a; |