Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REGRESSION(r274527): [GStreamer] media/webaudio-background-playback.h…
…tml now failing https://bugs.webkit.org/show_bug.cgi?id=223840 Patch by Philippe Normand <firstname.lastname@example.org> on 2021-03-28 Reviewed by Chris Dumez. r274527 actually exposed a bug that was present since r271197. The AudioDestination pipeline was not stopping properly because webkitGstSetElementStateSynchronously() was returning too early. This patch also includes a few improvements in the webaudiosrc element, most notably regarding its preroll state. The element now stops emitting buffers downstream as soon as the AudioDestination is scheduled to stop. * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp: (webKitWebAudioSrcRenderAndPushFrames): Return early as soon as the destination is scheduled to stop. (webKitWebAudioSrcChangeState): Synchronize preroll state with element state. * platform/graphics/gstreamer/GStreamerCommon.cpp: (WebCore::webkitGstSetElementStateSynchronously): targetState might be lower than current state, e.g, when stopping a running pipeline, so we can't return early for those cases, otherwise the pipeline won't stop. Canonical link: https://commits.webkit.org/235852@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275149 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing 3 changed files with 36 additions and 7 deletions.