[webkit-changes] [WebKit/WebKit] d39df7: [GStreamer] MediaPlayerPrivateGStreamer::sourceSet...

Philippe Normand noreply at github.com
Mon Jun 19 01:09:22 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d39df7316b4a332ead8b4b6191303648c4df6042
      https://github.com/WebKit/WebKit/commit/d39df7316b4a332ead8b4b6191303648c4df6042
  Author: Philippe Normand <philn at igalia.com>
  Date:   2023-06-19 (Mon, 19 Jun 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
    M Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.h

  Log Message:
  -----------
  [GStreamer] MediaPlayerPrivateGStreamer::sourceSetup() can be called from a non-main thread in some cases
https://bugs.webkit.org/show_bug.cgi?id=258132

Reviewed by Xabier Rodriguez-Calvar.

The crash was happening due to usage of the WeakPtr m_player in non-main non-GC thread. The proposed
solution is to pass a reference to the PlatformMediaResource loader of the player to the HTTP source
element, thus avoiding usage of m_player in non-main non-GC thread.

* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::sourceSetup):
* Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcSetResourceLoader):
* Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.h:

Canonical link: https://commits.webkit.org/265298@main




More information about the webkit-changes mailing list