Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: baee51550e933f237246b7897512e02d0bf72f5b
https://github.com/WebKit/WebKit/commit/baee51550e933f237246b7897512e02d0bf72f5b
Author: Jean-Yves Avenard <[email protected]>
Date: 2026-06-01 (Mon, 01 Jun 2026)
Changed paths:
M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h
M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm
M Source/WebKit/GPUProcess/media/RemoteAudioVideoRendererProxyManager.cpp
M Source/WebKit/GPUProcess/media/RemoteAudioVideoRendererProxyManager.h
M
Source/WebKit/GPUProcess/media/RemoteAudioVideoRendererProxyManager.messages.in
M Source/WebKit/WebProcess/GPU/media/AudioVideoRendererRemote.cpp
M Source/WebKit/WebProcess/GPU/media/AudioVideoRendererRemote.h
Log Message:
-----------
AudioVideoRendererRemote: synchronize m_lastSeekTime and recover the
ready-for-more state after a
flush
https://bugs.webkit.org/show_bug.cgi?id=315993
rdar://problem/178418023
Reviewed by Jer Noble.
Two latent correctness bugs in the remote audio/video renderer
m_lastSeekTime was written on the client thread in prepareToSeek() but read by
currentTime() while seeking, and currentTime() was also called on the
MediaSource worker thread, so those accesses raced. Guard m_lastSeekTime with
m_lock and take the lock on both the write and the seeking-time read.
m_remoteReadyForMoreData was only ever set back to true by an EnqueueSample
reply or a ReadyForMoreMediaData message. When the renderer had last reported
not-ready and was then flushed, neither happened: nothing was enqueued while
not-ready (so no reply arrived), and the GPU side was not re-armed, so the
state stayed false and the data pump never resumed. Make FlushTrack an async
message that replies with the renderer's isReadyForMoreSamples once the flush
has run. The WebProcess sets readiness from that reply
-- which IPC ordering
places after any in-flight EnqueueSample replies, so a stale reply cannot
clobber it -- and, when the reply is false, sends RequestMediaDataWhenReady so
the subsequent ReadyForMoreMediaData resumes the pump.
* Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h:
* Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm:
(WebCore::MediaPlayerPrivateWebM::flush): Deleted.
* Source/WebKit/GPUProcess/media/RemoteAudioVideoRendererProxyManager.cpp:
(WebKit::RemoteAudioVideoRendererProxyManager::flushTrack):
* Source/WebKit/GPUProcess/media/RemoteAudioVideoRendererProxyManager.h:
*
Source/WebKit/GPUProcess/media/RemoteAudioVideoRendererProxyManager.messages.in:
* Source/WebKit/WebProcess/GPU/media/AudioVideoRendererRemote.cpp:
(WebKit::AudioVideoRendererRemote::prepareToSeek):
(WebKit::AudioVideoRendererRemote::currentTime const):
(WebKit::AudioVideoRendererRemote::flush): Assert method is not reached as
neither
MediaPlayerPrivateWebM nor MSE player are using it.
(WebKit::AudioVideoRendererRemote::flushTrack):
* Source/WebKit/WebProcess/GPU/media/AudioVideoRendererRemote.h:
Canonical link:
https://flagged.apple.com:443/proxy?t2=DQ5M6i8Qm3&o=aHR0cHM6Ly9jb21taXRzLndlYmtpdC5vcmcvMzE0MzI1QG1haW4=&emid=b9db0184-abe2-4761-ac99-8c9c19bfc8f2&c=11
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications