[Webkit-unassigned] [Bug 185725] New: [MSE][GStreamer] Don't set the ReadyState to HaveNothing when an error occurs in the playback pipeline
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu May 17 06:52:24 PDT 2018
https://bugs.webkit.org/show_bug.cgi?id=185725
Bug ID: 185725
Summary: [MSE][GStreamer] Don't set the ReadyState to
HaveNothing when an error occurs in the playback
pipeline
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebKit WPE
Assignee: webkit-unassigned at lists.webkit.org
Reporter: bandou.yacine at gmail.com
CC: aboya at igalia.com, bugs-noreply at webkitgtk.org,
calvaris at igalia.com, olivier.blin at softathome.com
This patch fixes the crash of some WPT encrypted-media tests like: clearkey-mp4-playback-temporary-multikey-sequential.https.html or clearkey-mp4-playback-temporary-clear-encrypted.https.html.
These crashes should be fixed in 185242 but unfortunately it isn't the case. See bug 185242 for more detail.
Here is the root cause of the crash:
1.When an error occurs in playback pipeline (no decipher key for example), we receive an error message in MediaPlayerPrivateGStreamer::handleMessage -> MediaPlayerPrivateGStreamer::loadingFailed (MediaPlayer::FormatError).
2.The function loadingFailed -> HTMLMediaElement::mediaPlayerNetworkStateChanged (MediaPlayer::FormatError) -> setNetworkState -> mediaLoadingFailed -> noneSupported go to the point 3
|
-> HTMLMediaElement::mediaPlayerReadyStateChanged(MediaPlayer::HaveNothing) -> setReadyState -> updatePlayState() go to the point 5
3.nonSupported -> detachMediaSource -> MediaSource::detachFromElement -> removeSourceBuffer -> MediaSourceGStreamer::removeSourceBuffer -> .. ->PlaybackPipeline::removeSourceBuffer
4.PlaybackPipeline::removeSourceBuffer -> webKitMediaSrcFreeStream .
5.HTMLMediaElement::updatePlayState -> potentiallyPlaying -> stoppedDueToErrors ( This function returns false because (m_readyState >= HAVE_METADATA && m_error) is false, m_readyState equal to HaveNothing )
6.HTMLMediaElement::updatePlayState -> MediaPlayer::play -> MediaPlayerPrivateGStreamer::play -> changePipelineState (set the pipeline to playing state)
7.WebkitMediaSourceGStreamer sends "source-setup" signal when its state change from Ready to Paused, the signal catched in MediaPlayerPrivateGStreamer::sourceSetupCallback
8.MediaPlayerPrivateGStreamer::sourceSetupCallback -> MediaPlayerPrivateGStreamerMSE::sourceSetup -> MediaSourceGStreamer::open -> MediaSource::setPrivateAndOpen (crash in this function because the mediaSource is detached from mediaElement in the point 3, thus the variable m_mediaElement is null).
In the point 5 the function "HTMLMediaElement::stoppedDueToErrors" returns false, because m_readyState equal to HaveNothing and it is not upper than HAVE_METADATA.
In order to avoid trying again to play the same URI after an error, we don't set the ReadyState to HaveNothing when an error occurs in the pipeline, we should simply set NetworkState to error.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180517/18c85ac9/attachment-0001.html>
More information about the webkit-unassigned
mailing list