mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
hls: Store allowcache playlist field in a boolean
This commit is contained in:
parent
53f06e44b7
commit
816000f726
2 changed files with 5 additions and 4 deletions
|
@ -65,7 +65,6 @@ gst_m3u8_free (GstM3U8 * self)
|
||||||
g_return_if_fail (self != NULL);
|
g_return_if_fail (self != NULL);
|
||||||
|
|
||||||
g_free (self->uri);
|
g_free (self->uri);
|
||||||
g_free (self->allowcache);
|
|
||||||
g_free (self->codecs);
|
g_free (self->codecs);
|
||||||
g_free (self->key);
|
g_free (self->key);
|
||||||
|
|
||||||
|
@ -299,6 +298,9 @@ gst_m3u8_update (GstM3U8 * self, gchar * data, gboolean * updated)
|
||||||
self->files = NULL;
|
self->files = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* By default, allow caching */
|
||||||
|
self->allowcache = TRUE;
|
||||||
|
|
||||||
list = NULL;
|
list = NULL;
|
||||||
duration = 0;
|
duration = 0;
|
||||||
title = NULL;
|
title = NULL;
|
||||||
|
@ -461,8 +463,7 @@ gst_m3u8_update (GstM3U8 * self, gchar * data, gboolean * updated)
|
||||||
/* <YYYY-MM-DDThh:mm:ssZ> */
|
/* <YYYY-MM-DDThh:mm:ssZ> */
|
||||||
GST_DEBUG ("FIXME parse date");
|
GST_DEBUG ("FIXME parse date");
|
||||||
} else if (g_str_has_prefix (data, "#EXT-X-ALLOW-CACHE:")) {
|
} else if (g_str_has_prefix (data, "#EXT-X-ALLOW-CACHE:")) {
|
||||||
g_free (self->allowcache);
|
self->allowcache = g_ascii_strcasecmp (data + 19, "YES") == 0;
|
||||||
self->allowcache = g_strdup (data + 19);
|
|
||||||
} else if (g_str_has_prefix (data, "#EXT-X-KEY:")) {
|
} else if (g_str_has_prefix (data, "#EXT-X-KEY:")) {
|
||||||
gchar *v, *a;
|
gchar *v, *a;
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ struct _GstM3U8
|
||||||
gboolean endlist; /* if ENDLIST has been reached */
|
gboolean endlist; /* if ENDLIST has been reached */
|
||||||
gint version; /* last EXT-X-VERSION */
|
gint version; /* last EXT-X-VERSION */
|
||||||
GstClockTime targetduration; /* last EXT-X-TARGETDURATION */
|
GstClockTime targetduration; /* last EXT-X-TARGETDURATION */
|
||||||
gchar *allowcache; /* last EXT-X-ALLOWCACHE */
|
gboolean allowcache; /* last EXT-X-ALLOWCACHE */
|
||||||
gchar *key;
|
gchar *key;
|
||||||
|
|
||||||
gint bandwidth;
|
gint bandwidth;
|
||||||
|
|
Loading…
Reference in a new issue