mpdparser: Free UTCTiming struct if there are no values associated with it
authorSebastian Dröge <sebastian@centricular.com>
Sun, 16 Aug 2015 10:52:09 +0000 (12:52 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Sun, 16 Aug 2015 10:52:51 +0000 (12:52 +0200)
CID 1316479

ext/dash/gstmpdparser.c

index f500c1fa0e49cf8a6e6693f0f3667c7e53ffcdcf..98ef97824963e0ab98cc03f1495d66291d8f4b0e 100644 (file)
@@ -1822,6 +1822,7 @@ gst_mpdparser_parse_utctiming_node (GList ** list, xmlNode * a_node)
     }
     xmlFree (method);
   }
+
   if (gst_mpdparser_get_xml_prop_string (a_node, "value", &value)) {
     int max_tokens = 0;
     if (GST_MPD_UTCTIMING_TYPE_DIRECT == new_timing->method) {
@@ -1833,6 +1834,8 @@ gst_mpdparser_parse_utctiming_node (GList ** list, xmlNode * a_node)
     new_timing->urls = g_strsplit (value, " ", max_tokens);
     xmlFree (value);
     *list = g_list_append (*list, new_timing);
+  } else {
+    gst_mpdparser_free_utctiming_node (new_timing);
   }
 }