mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
mpdparser: added support for parsing fraction of seconds in dateTime fields
https://bugzilla.gnome.org/show_bug.cgi?id=758410
This commit is contained in:
parent
1c8e2f3497
commit
650b7b8fce
1 changed files with 5 additions and 4 deletions
|
@ -836,7 +836,8 @@ gst_mpdparser_get_xml_prop_dateTime (xmlNode * a_node,
|
||||||
xmlChar *prop_string;
|
xmlChar *prop_string;
|
||||||
gchar *str;
|
gchar *str;
|
||||||
gint ret, pos;
|
gint ret, pos;
|
||||||
gint year, month, day, hour, minute, second;
|
gint year, month, day, hour, minute;
|
||||||
|
gdouble second;
|
||||||
gboolean exists = FALSE;
|
gboolean exists = FALSE;
|
||||||
|
|
||||||
prop_string = xmlGetProp (a_node, (const xmlChar *) property_name);
|
prop_string = xmlGetProp (a_node, (const xmlChar *) property_name);
|
||||||
|
@ -879,12 +880,12 @@ gst_mpdparser_get_xml_prop_dateTime (xmlNode * a_node,
|
||||||
str += (pos + 1);
|
str += (pos + 1);
|
||||||
GST_TRACE (" - minute %d", minute);
|
GST_TRACE (" - minute %d", minute);
|
||||||
/* parse second */
|
/* parse second */
|
||||||
ret = sscanf (str, "%d", &second);
|
ret = sscanf (str, "%lf", &second);
|
||||||
if (ret != 1 || second < 0)
|
if (ret != 1 || second < 0)
|
||||||
goto error;
|
goto error;
|
||||||
GST_TRACE (" - second %d", second);
|
GST_TRACE (" - second %lf", second);
|
||||||
|
|
||||||
GST_LOG (" - %s: %4d/%02d/%02d %02d:%02d:%02d", property_name,
|
GST_LOG (" - %s: %4d/%02d/%02d %02d:%02d:%09.6lf", property_name,
|
||||||
year, month, day, hour, minute, second);
|
year, month, day, hour, minute, second);
|
||||||
|
|
||||||
exists = TRUE;
|
exists = TRUE;
|
||||||
|
|
Loading…
Reference in a new issue