summaryrefslogtreecommitdiff
path: root/ext/hls/m3u8.c
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-05-05 09:34:56 +0200
committerSebastian Dröge <sebastian@centricular.com>2014-05-05 09:41:51 +0200
commit816000f726c7ddbf9edebd0fb67e05240669a9f7 (patch)
tree3429ff766de5da371547b6e197502735367b6a74 /ext/hls/m3u8.c
parent53f06e44b7e6be469939829a4a3768e339633848 (diff)
downloadgstreamer-plugins-bad-816000f726c7ddbf9edebd0fb67e05240669a9f7.tar.gz
hls: Store allowcache playlist field in a boolean
Diffstat (limited to 'ext/hls/m3u8.c')
-rw-r--r--ext/hls/m3u8.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/hls/m3u8.c b/ext/hls/m3u8.c
index e21590def..f09158441 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;
@@ -461,8 +463,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;