Bug 193156 - A MediaTime timescale must never be zero
Summary: A MediaTime timescale must never be zero
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-01-04 13:32 PST by Eric Carlson
Modified: 2019-01-07 11:59 PST (History)
5 users (show)

See Also:


Attachments
Patch (5.62 KB, patch)
2019-01-04 15:35 PST, Eric Carlson
no flags Details | Formatted Diff | Diff
Patch (5.99 KB, patch)
2019-01-04 16:53 PST, Eric Carlson
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews104 for mac-sierra-wk2 (4.28 MB, application/zip)
2019-01-04 17:50 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews102 for mac-sierra (3.72 MB, application/zip)
2019-01-04 17:58 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews121 for ios-simulator-wk2 (2.39 MB, application/zip)
2019-01-04 18:47 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews114 for mac-sierra (3.41 MB, application/zip)
2019-01-04 19:06 PST, EWS Watchlist
no flags Details
Patch (6.00 KB, patch)
2019-01-05 12:45 PST, Eric Carlson
no flags Details | Formatted Diff | Diff
Patch for landing (5.98 KB, patch)
2019-01-07 11:20 PST, Eric Carlson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Carlson 2019-01-04 13:32:08 PST
The MediaTime's timescale is frequently used as a divisor, so don't allow it to be zero.
Comment 1 Eric Carlson 2019-01-04 15:35:56 PST
Created attachment 358385 [details]
Patch
Comment 2 Eric Carlson 2019-01-04 15:37:04 PST
<rdar://problem/32504501>
Comment 3 Eric Carlson 2019-01-04 16:53:24 PST
Created attachment 358398 [details]
Patch
Comment 4 EWS Watchlist 2019-01-04 17:50:33 PST
Comment on attachment 358398 [details]
Patch

Attachment 358398 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/10635031

New failing tests:
imported/w3c/web-platform-tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest.html
webaudio/silence-after-playback.html
Comment 5 EWS Watchlist 2019-01-04 17:50:35 PST
Created attachment 358406 [details]
Archive of layout-test-results from ews104 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 6 EWS Watchlist 2019-01-04 17:58:15 PST
Comment on attachment 358398 [details]
Patch

Attachment 358398 [details] did not pass mac-ews (mac):
Output: https://webkit-queues.webkit.org/results/10635317

New failing tests:
imported/w3c/web-platform-tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest.html
webaudio/silence-after-playback.html
Comment 7 EWS Watchlist 2019-01-04 17:58:17 PST
Created attachment 358407 [details]
Archive of layout-test-results from ews102 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 8 EWS Watchlist 2019-01-04 18:47:06 PST
Comment on attachment 358398 [details]
Patch

Attachment 358398 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/10635436

New failing tests:
imported/w3c/web-platform-tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest.html
Comment 9 EWS Watchlist 2019-01-04 18:47:08 PST
Created attachment 358417 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.6
Comment 10 EWS Watchlist 2019-01-04 19:06:19 PST
Comment on attachment 358398 [details]
Patch

Attachment 358398 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/10635518

New failing tests:
http/wpt/css/css-animations/start-animation-001.html
webaudio/silence-after-playback.html
Comment 11 EWS Watchlist 2019-01-04 19:06:21 PST
Created attachment 358420 [details]
Archive of layout-test-results from ews114 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 12 Eric Carlson 2019-01-05 12:45:59 PST
Created attachment 358442 [details]
Patch
Comment 13 Jer Noble 2019-01-07 10:14:51 PST
Comment on attachment 358442 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=358442&action=review

r=me with nit:

> Source/WTF/wtf/MediaTime.cpp:90
> +    if (value < 0)
> +        *this = negativeInfiniteTime();
> +    else
> +        *this = positiveInfiniteTime();

Nit: in other places you use a ternary operator for this kind of thing.
Comment 14 Eric Carlson 2019-01-07 11:20:17 PST
Created attachment 358510 [details]
Patch for landing
Comment 15 WebKit Commit Bot 2019-01-07 11:59:29 PST
Comment on attachment 358510 [details]
Patch for landing

Clearing flags on attachment: 358510

Committed r239688: <https://trac.webkit.org/changeset/239688>
Comment 16 WebKit Commit Bot 2019-01-07 11:59:31 PST
All reviewed patches have been landed.  Closing bug.