From a7751aa96759462b8e95fc850110fd0c6013587c Mon Sep 17 00:00:00 2001 From: Florin Apostol Date: Wed, 15 Jul 2015 16:21:00 +0100 Subject: [PATCH] dashdemux: gst_mpdparser_get_xml_prop_duration sets default value in case of parsing errors The gst_mpdparser_get_xml_prop_duration function will set the property_value to the default_value in case the parsing fails. https://bugzilla.gnome.org/show_bug.cgi?id=752426 --- ext/dash/gstmpdparser.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c index 84c3c6347a..83f6b9179d 100644 --- a/ext/dash/gstmpdparser.c +++ b/ext/dash/gstmpdparser.c @@ -788,6 +788,7 @@ gst_mpdparser_get_xml_prop_duration (xmlNode * a_node, gboolean have_ms = FALSE; gboolean exists = FALSE; + *property_value = default_value; prop_string = xmlGetProp (a_node, (const xmlChar *) property_name); if (prop_string) { len = xmlStrlen (prop_string); @@ -910,9 +911,6 @@ gst_mpdparser_get_xml_prop_duration (xmlNode * a_node, GST_LOG (" - %s: %" G_GINT64_FORMAT, property_name, *property_value); } - if (!exists) { - *property_value = default_value; - } return exists; error: @@ -1648,8 +1646,6 @@ gst_mpdparser_parse_period_node (GList ** list, xmlNode * a_node) new_period = g_slice_new0 (GstPeriodNode); *list = g_list_append (*list, new_period); - new_period->start = GST_CLOCK_TIME_NONE; - GST_LOG ("attributes of Period node:"); gst_mpdparser_get_xml_prop_string (a_node, "id", &new_period->id); gst_mpdparser_get_xml_prop_duration (a_node, "start", -1, &new_period->start);