[Webkit-unassigned] [Bug 185242] [MSE][GStreamer] Delete properly the stream from the WebKitMediaSource

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 3 06:30:27 PDT 2018


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

--- Comment #2 from Yacine Bandou <bandou.yacine at gmail.com> ---
(In reply to Enrique OcaƱa from comment #1)
> Is this SourceBuffer removal happening at any time point different from the
> player destruction? Specifically, do you have any use case where the player
> keeps being used after a single SourceBuffer is removed? This would mean
> that actual removal of the appsrc and parser elements on demand should be
> taken into account (currently isn't, as you pointed out).
> 
> Otherwise, the WebKitMediaSrc bin destruction should automatically trigger
> the destruction of the appsrc and parser elements. I don't remember the
> implications now, but probably the implementation is like this (removal
> deferred to bin destruction) in order to avoid transient states caused by
> the on-demand removal, which might complicate WebKitMediaSrc management
> without need in a moment where its final destruction is about to happen.

Currently when there is an error in playback as no decryption key in the decryptor the implementation calls  HTMLMediaElement::noneSupported() wich 
detaches the MediaSource from MediaElement then it removes all its SourceBuffers.

When we remove SourceBuffer the function webKitMediaSrcFreeStream(m_webKitMediaSrc.get(), stream)  is called via PlaybackPipeline::removeSourceBuffer(sourceBufferPrivate).

Then the PlayerPrivate catch "source-setup" signal and calls MediaPlayerPrivateGStreamerMSE::sourceSetup wich calls setPrivateAndOpen via MediaSourceGStreamer::open.

The function setPrivateAndOpen tries to call the instance of MediaElement wich is already detached from MediaSource, thus causing a crash.  

When we properly delete the Stream by removing the appropriate appsrc and parser from the bin, the pipeline never send the "source-setup" signal.

Otherwise, I think the function webKitMediaSrcFreeStream should delete the Stream correctly without having this crash.

-- 
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/20180503/f0f3480d/attachment.html>


More information about the webkit-unassigned mailing list