This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REGRESSION(r290375) [GStreamer] Deadlock in WebProcess termination if…
… AppendPipeline is started https://bugs.webkit.org/show_bug.cgi?id=240716 Patch by Olivier Blin <firstname.lastname@example.org> on 2022-05-23 Reviewed by Alicia Boya Garcia. Since r290375, GStreamer ports are calling gst_deinit() at WebProcess termination. This is causing a deadlock if a MSE SourceBuffer has been instantiated. That is because the GstTask from the appsrc element in the AppendPipeline is still running. To avoid the deadlock, stop the appsrc element in the AppendPipeline when the SourceBuffer is removed from the MediaSource, since it will not be useful anymore after being removed from its associated MediaSource. The W3C spec of MediaSource.removeSourceBuffer mentions as a last step that it should destroy all resources for sourceBuffer. The MediaSource will be stopped at WebProcess termination, since active DOM objects are stopped when detaching the frame. This ensures that MediaSource is detached from its media element, and that it removes its source buffers. Drive-by fix: remove resetPipeline declaration, deleted in r238892 * Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp: (WebCore::AppendPipeline::stopParser): * Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.h: * Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp: (WebCore::SourceBufferPrivateGStreamer::removedFromMediaSource): Canonical link: https://commits.webkit.org/250860@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing 3 changed files with 17 additions and 2 deletions.