Title: [232061] trunk/Source/WebCore
- Revision
- 232061
- Author
- [email protected]
- Date
- 2018-05-22 04:40:13 -0700 (Tue, 22 May 2018)
Log Message
[GStreamer] Don't set the ReadyState to HaveNothing when an error occurs in playback pipeline
https://bugs.webkit.org/show_bug.cgi?id=185725
Patch by Yacine Bandou <[email protected]> on 2018-05-22
Reviewed by Philippe Normand.
The ReadyState should not be set to HaveNothing when an error occurs in playback pipeline, because
at least we should have the metadata in order to have an error in pipeline.
Here is the definition of HaveNothing state in W3C spec https://dev.w3.org/html5/spec-preview/media-elements.html#ready-states
"HAVE_NOTHING (numeric value 0): No information regarding the media resource is available. No data for the current
playback position is available. Media elements whose networkState attribute is NETWORK_EMPTY are always in the HAVE_NOTHING state."
In MSE case, this patch fixes the crashes of the followings WPT encrypted-media tests:
- clearkey-mp4-playback-temporary-clear-encrypted.https.html
- clearkey-mp4-playback-temporary-multikey-sequential.https.html
- clearkey-mp4-playback-temporary-multikey-sequential-readyState.https.html
Here is the cause of the crashes: When an error occurs in playback pipeline like no decipher key, in case of encrypted content,
the MediaPlayerPrivateGstreamer sets NetworkState to FormatError which causes the detachment of MediaElement from MediaSource,
then MediaPlayerPrivateGstreamer sets the ReadyState to HaveNothing which causes a trying again to play the same URI,
thus the crash occurs because the MediaElement is detached from MediaSource, see bugzilla for more details.
Note: these crashes should be fixed in 185242 but unfortunately it isn't the case. See bug 185242 for more details.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (232060 => 232061)
--- trunk/Source/WebCore/ChangeLog 2018-05-22 11:37:15 UTC (rev 232060)
+++ trunk/Source/WebCore/ChangeLog 2018-05-22 11:40:13 UTC (rev 232061)
@@ -1,5 +1,33 @@
2018-05-22 Yacine Bandou <[email protected]>
+ [GStreamer] Don't set the ReadyState to HaveNothing when an error occurs in playback pipeline
+ https://bugs.webkit.org/show_bug.cgi?id=185725
+
+ Reviewed by Philippe Normand.
+
+ The ReadyState should not be set to HaveNothing when an error occurs in playback pipeline, because
+ at least we should have the metadata in order to have an error in pipeline.
+
+ Here is the definition of HaveNothing state in W3C spec https://dev.w3.org/html5/spec-preview/media-elements.html#ready-states
+ "HAVE_NOTHING (numeric value 0): No information regarding the media resource is available. No data for the current
+ playback position is available. Media elements whose networkState attribute is NETWORK_EMPTY are always in the HAVE_NOTHING state."
+
+ In MSE case, this patch fixes the crashes of the followings WPT encrypted-media tests:
+ - clearkey-mp4-playback-temporary-clear-encrypted.https.html
+ - clearkey-mp4-playback-temporary-multikey-sequential.https.html
+ - clearkey-mp4-playback-temporary-multikey-sequential-readyState.https.html
+
+ Here is the cause of the crashes: When an error occurs in playback pipeline like no decipher key, in case of encrypted content,
+ the MediaPlayerPrivateGstreamer sets NetworkState to FormatError which causes the detachment of MediaElement from MediaSource,
+ then MediaPlayerPrivateGstreamer sets the ReadyState to HaveNothing which causes a trying again to play the same URI,
+ thus the crash occurs because the MediaElement is detached from MediaSource, see bugzilla for more details.
+ Note: these crashes should be fixed in 185242 but unfortunately it isn't the case. See bug 185242 for more details.
+
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
+
+2018-05-22 Yacine Bandou <[email protected]>
+
[MSE][GStreamer] Fix the deadlock caused by bug 185242 (r231351)
https://bugs.webkit.org/show_bug.cgi?id=185723
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (232060 => 232061)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2018-05-22 11:37:15 UTC (rev 232060)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2018-05-22 11:40:13 UTC (rev 232061)
@@ -1155,8 +1155,13 @@
if (attemptNextLocation)
issueError = !loadNextLocation();
- if (issueError)
- loadingFailed(error);
+ if (issueError) {
+ m_errorOccured = true;
+ if (m_networkState != error) {
+ m_networkState = error;
+ m_player->networkStateChanged();
+ }
+ }
break;
case GST_MESSAGE_EOS:
didEnd();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes