WebPlatformForEmbedded / WPEWebKit

WPE WebKit port (downstream)
213 stars 141 forks source link

[wpe-2.38][mse] an error reported on early EOS #1366

Closed emutavchi closed 3 months ago

emutavchi commented 4 months ago

WPEWebKit MSE reports a playback error when app ends stream before appending any samples. Reproducible with attached test mse_early_eos.html.gz

Jul 16 12:09:39 pioneer-v2-2k HtmlApp-0[2103]: [HtmlApp-0]:87 onSourceOpen()
Jul 16 12:09:39 pioneer-v2-2k HtmlApp-0[2103]: [HtmlApp-0]:35 fetch: https://dash.akamaized.net/akamai/bbb_30fps/bbb_a64k/bbb_a64k_0.m4a
Jul 16 12:09:39 pioneer-v2-2k HtmlApp-0[2103]: [HtmlApp-0]:35 fetch: https://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps_1280x720_4000k/bbb_30fps_1280x720_4000k_0.m4v
Jul 16 12:09:39 pioneer-v2-2k HtmlApp-0[2103]: [HtmlApp-0]:54 appendToBuffer: https://dash.akamaized.net/akamai/bbb_30fps/bbb_a64k/bbb_a64k_0.m4a
Jul 16 12:09:39 pioneer-v2-2k HtmlApp-0[2103]: [HtmlApp-0]:54 appendToBuffer: https://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps_1280x720_4000k/bbb_30fps_1280x720_4000k_0.m4v
Jul 16 12:09:39 pioneer-v2-2k HtmlApp-0[2103]: [WPEWebKit:Media:-] HTMLMediaElement::mediaLoadingFailed(A5B4F295) error = 4
Jul 16 12:09:43 pioneer-v2-2k HtmlApp-0[2103]: [HtmlApp-0]:79 Test failed. Got an error: 4, GStreamer encountered a general stream error
eocanha commented 3 months ago

I've developed a preliminary solution in https://github.com/WebPlatformForEmbedded/WPEWebKit/commit/29c0ec7200c44195a109b8929c5bfb54e1dd8eab, in the https://github.com/WebPlatformForEmbedded/WPEWebKit/commits/eocanha/eocanha-debug-150 branch. I still have to port it upstream, check the layout tests and have it reviewed, but at least it's a start.

eocanha commented 3 months ago

The patch has landed upstream as https://commits.webkit.org/282958@main and was backported to wpe-2.38 as https://github.com/WebPlatformForEmbedded/WPEWebKit/commit/a584664157df52094785f1a1814569f87165e26e.

Closing this Issue.

eocanha commented 3 months ago

I must have screwed my local environment and the commit had some merge leftovers. I've undone it (force-pushed the previous wpe-2.38 commit before mine) and I'm pushing again mine in a moment.

eocanha commented 3 months ago

Now for good, backported to wpe-2.38 as https://github.com/WebPlatformForEmbedded/WPEWebKit/commit/cf98ff899a4594032630658471d6d0bc4d5ab003