Bug 1450845 - MediaDecoderStateMachine now ignores SeekToNextFrame if already seeking. r=jya
SeekToNextFrame is handled differently than other seeks by the MediaDecoderStateMachine, and should not take place while other seeks already are. Bug 1410225 implemented some changes in HTMLMediaElement to prevent this, but it's still possible to move to a seeking state in the MDSM and accept SeekToNextFrame (as in this bug). This changeset changes the MDSM to reject SeekToNextFrame if a seek is already happening. Since the MDSM now does this the changes from bug 1410225 can be removed. This has the functional change of the promise from SeekToNextFrame being rejected if the seek in not performed due to another seek. Previously the promise would succeed when the other seek completed. This seems sensible as the next frame seek does not actually take place. MozReview-Commit-ID: HD9WRFq3LZV
This commit is contained in:
@@ -2720,12 +2720,6 @@ HTMLMediaElement::FastSeek(double aTime, ErrorResult& aRv)
|
||||
already_AddRefed<Promise>
|
||||
HTMLMediaElement::SeekToNextFrame(ErrorResult& aRv)
|
||||
{
|
||||
if (mSeekDOMPromise) {
|
||||
// We can't perform NextFrameSeek while seek is already in action.
|
||||
// Just return the pending seek promise.
|
||||
return do_AddRef(mSeekDOMPromise);
|
||||
}
|
||||
|
||||
/* This will cause JIT code to be kept around longer, to help performance
|
||||
* when using SeekToNextFrame to iterate through every frame of a video.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user