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 758064 - dashdemux: leading whitespaces in content protection element are not ignored
dashdemux: leading whitespaces in content protection element are not ignored
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.9.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-11-13 15:38 UTC by Florin Apostol
Modified: 2016-04-22 20:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.71 KB, patch)
2015-11-13 15:40 UTC, Florin Apostol
none Details | Review
unit test reproducing the problem (11.14 KB, patch)
2015-11-13 15:40 UTC, Florin Apostol
none Details | Review

Description Florin Apostol 2015-11-13 15:38:44 UTC
When processing content protection information, dashdemux uses g_str_has_prefix to make sure only urn:uuid events are generated. But this will not work if there are some leading whitespaces in the content protection schemeIdUri.
Comment 1 Florin Apostol 2015-11-13 15:40:25 UTC
Created attachment 315415 [details] [review]
proposed patch
Comment 2 Florin Apostol 2015-11-13 15:40:42 UTC
Created attachment 315416 [details] [review]
unit test reproducing the problem
Comment 3 Thiago Sousa Santos 2016-04-22 20:56:27 UTC
Thanks for the patch. Merged a different solution that strips whitespace when parsing the mpd so that dashdemux doesn't have to deal with it. Also, your version was always converting the string to lowercase which isn't required.

commit 808a51dc0e2011c24eee9c1a691473ec2886aa49
Author: Florin Apostol <florin.apostol@oregan.net>
Date:   Tue Feb 16 11:37:44 2016 +0000

    dashdemux: tests: added content protection test
    
    Test content protection
    Configure 3 content protection sources:
    - a uuid scheme/value pair
    - a non uuid scheme/value pair (dash recognises only uuid schemes)
    - a complex uuid scheme, with trailing spaces and capital letters in scheme uri
    Only the uuid scheme should be recognised. We expect to receive 2 content protection events
    
    https://bugzilla.gnome.org/show_bug.cgi?id=758064

commit aa7a3cb24f33d580cab067a81c505c9ff0d3fd72
Author: Thiago Santos <thiagoss@osg.samsung.com>
Date:   Fri Apr 22 17:04:57 2016 -0300

    dash: strip lead/trailing whitespace from descriptortype attributes
    
    The spec says it is xs:anyURI and leading and trailing whitespace
    are to be ignored
    
    https://bugzilla.gnome.org/show_bug.cgi?id=758064
Comment 4 Thiago Sousa Santos 2016-04-22 20:57:55 UTC
Comment on attachment 315416 [details] [review]
unit test reproducing the problem

Got the tests patch from another bug, so marking here as obsolete. (The other bug had a more recent version)