Bug 160199
Summary: | MediaFragmentURIParser rejects valid NPT strings if 'hours' is defined using 1 digit | ||
---|---|---|---|
Product: | WebKit | Reporter: | Fabien Vallée <fvallee> |
Component: | Media | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Minor | CC: | eric.carlson, jeremyj-wk, jer.noble, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Local Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Fabien Vallée
If a media uri contains a fragment, the MediaFragmentURIParser (Source/WebCore/html/MediaFragmentURIParser.cpp) is used to get the temporal clipping values (if any).
Based on https://www.w3.org/TR/media-frags/#rtsp: "Minutes and seconds must be specified as exactly two digits, hours and fractional seconds can be any number of digits".
As far as I understand the specifications, "t=0:02:00,121.5" is valid (it's an example from the W3C specs anyway) but this string is rejected by the MediaFragmentURIParser (Source/WebCore/html/MediaFragmentURIParser.cpp)
===================
Steps to reproduce:
The regression test LayoutTests/media/media-fragments/TC0078.html can PASS using "t=00:00:03,00:00:07" string, as defined in LayoutTests/media/media-fragments/media-fragments.js:
TC0078 : { start: 3, end: 7, valid: true, description: "NPT HH:MM:SS format", fragment: "t=00:00:03,00:00:07", comment: "The media is requested from a to b."},
If the fragment is changed to "t=0:00:03,00:00:07" (use only 1 digit for the hour), the test fails (based on my understanding "NPT H:MM:SS format" is valid and the test should pass).
===================
Note: 1-digit hour string ("0:00:03") is rejected because of https://trac.webkit.org/browser/trunk/Source/WebCore/html/MediaFragmentURIParser.cpp#L281
Please let me know if I'm missing something. thanks.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Fabien Vallée
FYI media/media-fragments/TC0078.html can PASS using Fragment: 't=00000:00:03,00:00:07'
Hours using more than 2 digits are accepted by the parser, only 1 digit hours is rejected.
EWS
Committed 278951@main (1b08c7ea9a82): <https://commits.webkit.org/278951@main>
Reviewed commits have been landed. Closing PR #28748 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/128318772>