Bug 220112 - REGRESSION[r270947][GStreamer]: Deadlocks audio rendering
Summary: REGRESSION[r270947][GStreamer]: Deadlocks audio rendering
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Audio (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Philippe Normand
URL:
Keywords: InRadar
Depends on: 219990
Blocks: 219245
  Show dependency treegraph
 
Reported: 2020-12-23 02:24 PST by Philippe Normand
Modified: 2021-01-06 01:57 PST (History)
15 users (show)

See Also:


Attachments
Patch (30.93 KB, patch)
2020-12-24 07:18 PST, Philippe Normand
cdumez: review+
cdumez: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2020-12-23 02:24:45 PST
+++ This bug was initially created as a clone of Bug #219990 +++

> Simplify code related to dispatchToRenderThread in WebAudio:
> 1. AudioDestination::start() now always gets called with a non-null dispatchToRenderThread lambda. In the case where there is no AudioWorkletThread to dispatch to, the lambda simply calls its task synchronously.

This is the cause of the regression in GStreamer ports, when there is no AudioWorklet, the dispatchCondition in WebKitWebAudioSourceGStreamer is fired synchronously before the corresponding wait call, introducing the infinite wait...
Comment 1 Philippe Normand 2020-12-24 07:18:43 PST
Created attachment 416749 [details]
Patch
Comment 2 Chris Dumez 2021-01-05 08:37:14 PST
Comment on attachment 416749 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=416749&action=review

> Source/WebCore/platform/audio/gstreamer/AudioDestinationGStreamer.h:59
> +    Optional<CompletionHandler<void(bool)>> m_startupCompletionHandler;

Does not need to be Optional<>. CompletionHandler has a null state.

> Source/WebCore/platform/audio/gstreamer/AudioDestinationGStreamer.h:60
> +    Optional<CompletionHandler<void(bool)>> m_stopCompletionHandler;

Ditto.
Comment 3 Philippe Normand 2021-01-06 01:57:56 PST
Committed r271197: <https://trac.webkit.org/changeset/271197>