GNOME Bugzilla – Bug 758410
mpdparser: parsing of dateTime fields does not read the microseconds part
Last modified: 2015-11-23 14:57:18 UTC
The xs:dateTime format allows to specify the number of microseconds. But the gst_mpdparser_get_xml_prop_dateTime function does not read them.
Created attachment 315978 [details] [review] unit test reproducing the problem
Created attachment 315979 [details] [review] proposed patch
Review of attachment 315979 [details] [review]: ::: ext/dash/gstmpdparser.c @@ +902,1 @@ + seconds_as_double = second + (gdouble) microsecond / 1000000; This assumes the field has all the 6 digits all the time. An entry of .123 would need to be 123000 microseconds and not just 123.
Created attachment 316039 [details] [review] proposed patch
(In reply to Thiago Sousa Santos from comment #3) > Review of attachment 315979 [details] [review] [review]: > > ::: ext/dash/gstmpdparser.c > @@ +902,1 @@ > + seconds_as_double = second + (gdouble) microsecond / 1000000; > > This assumes the field has all the 6 digits all the time. An entry of .123 > would need to be 123000 microseconds and not just 123. thank you for spotting it. Somehow I missed it. The new patch is simpler and should cover all cases. Please have a look at that.
commit c681c33d1046b15332d8aa480ea531622cc95156 Author: Florin Apostol <florin.apostol@oregan.net> Date: Fri Nov 20 16:35:43 2015 +0000 mpdparser: tests: added test for fraction of seconds in availabilityStartTime https://bugzilla.gnome.org/show_bug.cgi?id=758410 commit 650b7b8fceaf1397a4241c10a17ccd086233b574 Author: Florin Apostol <florin.apostol@oregan.net> Date: Fri Nov 20 16:36:00 2015 +0000 mpdparser: added support for parsing fraction of seconds in dateTime fields https://bugzilla.gnome.org/show_bug.cgi?id=758410