[webkit-changes] [WebKit/WebKit] cac80a: [WebCodecs] Flush before reconfiguring the encoder
youennf
noreply at github.com
Tue Oct 25 07:38:57 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: cac80a1b3b935765f6371aa888b9ad58eec562bd
https://github.com/WebKit/WebKit/commit/cac80a1b3b935765f6371aa888b9ad58eec562bd
Author: Youenn Fablet <youennf at gmail.com>
Date: 2022-10-25 (Tue, 25 Oct 2022)
Changed paths:
M LayoutTests/TestExpectations
M LayoutTests/imported/w3c/web-platform-tests/webcodecs/reconfiguring-encoder.https.any_h264_annexb-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/webcodecs/reconfiguring-encoder.https.any_h264_avc-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/webcodecs/reconfiguring-encoder.https.any_vp8-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/webcodecs/reconfiguring-encoder.https.any_vp9_p0-expected.txt
M Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.cpp
M Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.h
Log Message:
-----------
[WebCodecs] Flush before reconfiguring the encoder
https://bugs.webkit.org/show_bug.cgi?id=246994
rdar://problem/101532393
Reviewed by Eric Carlson.
In case we reconfigure an encoder, we will trigger a flush to get all encoded chunks before we change the configuration.
This allows to get the right configuration attached to encoded chunks.
This also ensures we get all encoded chunks since otherwise, there could be a race since we recreate a new encoder when calling configure.
The race is that we need to get all encoded chunks before the old encoder gets destroyed.
Drive-by fix of WebCodecsVideoEncoder::flush where we throwing an exception while we should reject the promise.
* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/webcodecs/reconfiguring-encoder.https.any_h264_annexb-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/webcodecs/reconfiguring-encoder.https.any_h264_avc-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/webcodecs/reconfiguring-encoder.https.any_vp8-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/webcodecs/reconfiguring-encoder.https.any_vp9_p0-expected.txt:
* Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.cpp:
(WebCore::WebCodecsVideoEncoder::configure):
(WebCore::WebCodecsVideoEncoder::flush):
* Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.h:
Canonical link: https://commits.webkit.org/255957@main
More information about the webkit-changes
mailing list