hlsdemux: m3u8: clear the list of media files before updating the playlist
authorAndoni Morales Alastruey <ylatuya@gmail.com>
Fri, 1 Apr 2011 23:10:37 +0000 (01:10 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 4 Apr 2011 07:13:41 +0000 (09:13 +0200)
gst/hls/m3u8.c

index 9d387ef460d0acc5333f1d1679857dedea9779d4..5bdbda1fb0641951fe5041238f04626b2447e804 100644 (file)
@@ -205,6 +205,12 @@ gst_m3u8_update (GstM3U8 * self, gchar * data, gboolean * updated)
   g_free (self->last_data);
   self->last_data = data;
 
+  if (self->files) {
+    g_list_foreach (self->files, (GFunc) gst_m3u8_media_file_free, NULL);
+    g_list_free (self->files);
+    self->files = NULL;
+  }
+
   list = NULL;
   duration = -1;
   title = NULL;