[Webkit-unassigned] [Bug 51407] A check should be in place to ensure that a media engine error has not occurred after MediaPlayer::play() is called

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 22 19:31:52 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=51407





--- Comment #4 from Eric Carlson <eric.carlson at apple.com>  2010-12-22 19:31:53 PST ---
(From update of attachment 77130)
View in context: https://bugs.webkit.org/attachment.cgi?id=77130&action=review

> WebCore/html/HTMLMediaElement.cpp:2062
> -        startPlaybackProgressTimer();
> -        m_playing = true;
> +        // Ensure that we don't have any errors (especially that the media engine didn't give us an error).
> +        if (!m_error) {
> +            startPlaybackProgressTimer();
> +            m_playing = true;
> +        } else {
> +            // In the event of an error, ensure that the playback rate is 0.
> +            m_player->setRate(0);
> +        }

This assumes that an error triggered by calling m_player->play() will always happen synchronously, eg. that it will happen before the call returns, which is *definitely* not the case on all platforms.

I think a better way to handle this is to ensure that your media engine doesn't signal an error by changing the network state until the next idle (queue a timer, or whatever).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list