Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c5970460b5775dd2316062396dc15e9c84214f83
      
https://github.com/WebKit/WebKit/commit/c5970460b5775dd2316062396dc15e9c84214f83
  Author: Enrique Ocaña González <[email protected]>
  Date:   2026-06-08 (Mon, 08 Jun 2026)

  Changed paths:
    M Source/WebCore/platform/gstreamer/GStreamerQuirkRialto.cpp
    M Source/WebCore/platform/gstreamer/GStreamerQuirkRialto.h

  Log Message:
  -----------
  [GStreamer][WebAudio] Disallow RialtoMSEAudio in WebAudio
https://bugs.webkit.org/show_bug.cgi?id=316404

Reviewed by Xabier Rodriguez-Calvar.

When WebAudio tries to find a decoder in Rialto, the platform-specific
RialtoMSEAudioSink matches caps and is auto-plugged, but it's not
actually suitable for the task. That sink can only play (render) encoded
audio, and isn't able to just do decoding (so that the decoded samples
are taken back by WebAudio). It can't play raw audio either. For those
reasons, it should be disabled for WebAudio usage.

This problem affects AudioContext.decodeAudioData usage when there is a
discrepancy between rialtomseaudiosink and software decoding plugins
available on the platform. Such a situation causes
HTMLMediaElement::canPlayType() declare support for content type but it
should be understood as playback and not decoding to PCM. In turn, it
makes `autoplug-select` as used in AudioFileReaderGStreamer.cpp [1] to
pick `rialtomseaudiosink` which is invalid as per case when:

- Non-PCM content is used - get stuck in sample passing loop, it will be
  waiting to play which doesn't really happen in this scenario as samples
  were to be pulled and passed to another pipeline.
- PCM content is used - crash as the samples pulled won't be available
  to be taken.

Adding rialtomseaudiosink to disallowed plugins list in quirks corrects
the situation and in case of missing browser side decoding plugin makes
it simply fail. when they are present, however, they will be the only and
right choice for decoding making it work as expected.

[1] 
https://github.com/WebPlatformForEmbedded/WPEWebKit/blob/wpe-2.38/Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp#L413C42-L413C57

See: https://github.com/WebPlatformForEmbedded/WPEWebKit/pull/1680

Original author: BunioFH <[email protected]>

* Source/WebCore/platform/gstreamer/GStreamerQuirkRialto.cpp:
(WebCore::GStreamerQuirkRialto::GStreamerQuirkRialto): Add rialtomseaudiosink 
to the list of disallowed WebAudio decoders.
* Source/WebCore/platform/gstreamer/GStreamerQuirkRialto.h: Added Vector of 
disallowed decoders. Override disallowedWebAudioDecoders() to return the Vector.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to