After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 758410 - mpdparser: parsing of dateTime fields does not read the microseconds part
mpdparser: parsing of dateTime fields does not read the microseconds part
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal normal
: 1.7.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-11-20 16:35 UTC by Florin Apostol
Modified: 2015-11-23 14:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
unit test reproducing the problem (2.02 KB, patch)
2015-11-20 16:37 UTC, Florin Apostol
committed Details | Review
proposed patch (1.93 KB, patch)
2015-11-20 16:37 UTC, Florin Apostol
none Details | Review
proposed patch (1.46 KB, patch)
2015-11-22 01:15 UTC, Florin Apostol
committed Details | Review

Description Florin Apostol 2015-11-20 16:35:42 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.
Comment 1 Florin Apostol 2015-11-20 16:37:00 UTC
Created attachment 315978 [details] [review]
unit test reproducing the problem
Comment 2 Florin Apostol 2015-11-20 16:37:17 UTC
Created attachment 315979 [details] [review]
proposed patch
Comment 3 Thiago Sousa Santos 2015-11-20 21:08:19 UTC
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.
Comment 4 Florin Apostol 2015-11-22 01:15:02 UTC
Created attachment 316039 [details] [review]
proposed patch
Comment 5 Florin Apostol 2015-11-22 01:16:48 UTC
(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.
Comment 6 Thiago Sousa Santos 2015-11-23 14:56:57 UTC
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