Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e5d420f7968f657885649914e9cf121ce250605c
https://github.com/WebKit/WebKit/commit/e5d420f7968f657885649914e9cf121ce250605c
Author: Jean-Yves Avenard <[email protected]>
Date: 2024-11-12 (Tue, 12 Nov 2024)
Changed paths:
M LayoutTests/platform/ios/TestExpectations
M Source/WebCore/platform/graphics/cocoa/VideoMediaSampleRenderer.h
M Source/WebCore/platform/graphics/cocoa/VideoMediaSampleRenderer.mm
M Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.h
M Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm
Log Message:
-----------
media/media-vp8-hiddenframes.html is an intermittent failure on iOS simulator
https://bugs.webkit.org/show_bug.cgi?id=282968
rdar://139697918
Reviewed by Youenn Fablet.
When the VideoMediaSampleRenderer was flushed, it flushed its
WebCoreDecompressionSession and queued a task to flush
the pending compressed samples queued to be decoded.
However, if any decoding tasks ran prior, it would continue to feed the old
samples (due to be dismissed) to the decoder.
This resulted in corrupted decoding.
A CMBufferQueue is thread-safe, we can flush it on the main thread. Which
guarantee than any pending decode task will be aborted.
Covered by existing test.
* LayoutTests/platform/ios/TestExpectations: Re-enable test.
* Source/WebCore/platform/graphics/cocoa/VideoMediaSampleRenderer.h:
* Source/WebCore/platform/graphics/cocoa/VideoMediaSampleRenderer.mm:
(WebCore::VideoMediaSampleRenderer::enqueueSample):
(WebCore::VideoMediaSampleRenderer::decodeNextSample):
(WebCore::VideoMediaSampleRenderer::initializeDecompressionSession):
(WebCore::VideoMediaSampleRenderer::flushCompressedSampleQueue):
(WebCore::VideoMediaSampleRenderer::flush):
(WebCore::VideoMediaSampleRenderer::ensureCompressedSampleQueue): Deleted.
* Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.h: Make
member m_flushId atomic as it's concurrently accessed on both the main thread
and the decode queue.
* Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm:
(WebCore::WebCoreDecompressionSession::enqueueSample):
(WebCore::WebCoreDecompressionSession::maybeDecodeNextSample): Drop compressed
samples if flushed before attempting to decode it.
(WebCore::WebCoreDecompressionSession::decodeSample): Do not attempt to decode
the sample if it's been flushed (its flushId would have changed).
Canonical link: https://commits.webkit.org/286512@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes