-
Notifications
You must be signed in to change notification settings - Fork 152
Description
In MSE playback, after receiving SourceBuffer::abort() we should execute the steps described in https://w3c.github.io/media-source/#dom-sourcebuffer-abort, including point 5. Run the reset parser state algorithm.
This point specifies the exact variable that must be changed to reset the parser. This point does not mention the clearing init segment that the player previously received. The backend has to be ready for audio, video data, but still, it is obliged to remember decoder settings.
(For example, different point: changeType directly specifies to abandon init segment because the playback settings changed)
We encounter this problem in VTM Go streaming where Shaka player executes: SourceBuffer::abort() and, after this, tries to continue the playback by sending later audio, video segments. Unfortunately, it fails as GStreamer expects a new init segment.
Simplified TC: first.html.txt show the problem. After abort() the player should still be able to play /1/0004.m4s and /1/0005.m4s, it indeed happens on x86 with Chromium or Firefox, but not on the WpeWebbrowser.
The second TC second.html.txt (with additional sending init segment after abort()) works on all browsers (but still, according to https://w3c.github.io/media-source specification, it should work without an extra init segment)
The same problem is described in https://bugs.webkit.org/show_bug.cgi?id=135164, along with the proposed patch to solve this. Unfortunately, the solution is for SourceBufferPrivateAVFObjC classes not used on the RDK board.
In Gstreamer, qtdemux.c after abort() changes its state from PAUSED to READE in gst_qtdemux_change_state, which invokes gst_qtdemux_reset (qtdemux, TRUE);. This method resets the parser with forgetting the init segment.
The TC was checked on our box (EosV1) and RPI3 with WPE2.22 image: https://drive.google.com/file/d/1Bwe1Uws3u46iiV69r9oPSpQcT0gXiElW/view?usp=sharing