Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c76c998e366bd3c9672d1971398cbf4b459e8399
https://github.com/WebKit/WebKit/commit/c76c998e366bd3c9672d1971398cbf4b459e8399
Author: Jean-Yves Avenard <[email protected]>
Date: 2026-08-03 (Mon, 03 Aug 2026)
Changed paths:
M Source/WebCore/platform/graphics/cocoa/VideoMediaSampleRenderer.mm
Log Message:
-----------
[Moon Player: AI -Enhanced 3D] blank black screen in full screen and video
paused
https://bugs.webkit.org/show_bug.cgi?id=320850
rdar://183773748
Reviewed by Abrar Rahman Protyasha.
When moon player extract the video layer from the WKWebView page, the
video very briefly goes invisible. While the transition usually works
out okay, it has been observed that the VTDecompressionSession gets invalidated.
When this happens, the decoding of the next sample typically returns error
error -12903 (kVTInvalidSessionErr) which we handled differently from other
decoding error and didn't treat it as a fatal error.
Intermittently however, the next error returned is -12911
(kVTVideoDecoderMalfunctionErr).
When this happened the error would be returned as a HTMLMediaElement decoding
error and YouTube then tears down the media player and re-create a new one.
This condition isn't handled by the Moon player and it continues to display
the old, now invalidated layer resulting in a black screen being shown.
We now handle kVTVideoDecoderMalfunctionErr the same as kVTInvalidSessionErr
and will recover from it by flushing the VideoMediaSampleRenderer and
re-creating
a WebCoreDecompressionSession.
Manually tested, couldn't reproduce the issue anymore.
* Source/WebCore/platform/graphics/cocoa/VideoMediaSampleRenderer.mm:
(WebCore::VideoMediaSampleRenderer::decodeNextSampleIfNeeded):
Canonical link: https://commits.webkit.org/318498@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications