GNOME Bugzilla – Bug 758064
dashdemux: leading whitespaces in content protection element are not ignored
Last modified: 2016-04-22 20:57:55 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.
Created attachment 315415 [details] [review] proposed patch
Created attachment 315416 [details] [review] unit test reproducing the problem
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 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)