mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 00:31:14 +00:00
TestVP9Decode: Dequeue frames from the decoder after sending a sample
Frames must be dequeued from the decoder, or the queue will grow continuously until OOM.
This commit is contained in:
parent
e1b3f9a26e
commit
dfd0eb877f
Notes:
sideshowbarker
2024-07-17 05:41:34 +09:00
Author: https://github.com/Zaggy1024 Commit: https://github.com/SerenityOS/serenity/commit/dfd0eb877f Pull-request: https://github.com/SerenityOS/serenity/pull/18357
|
@ -33,6 +33,15 @@ static void decode_video(StringView path, size_t expected_frame_count)
|
|||
auto block = block_result.release_value();
|
||||
for (auto const& frame : block.frames()) {
|
||||
MUST(vp9_decoder.receive_sample(frame));
|
||||
while (true) {
|
||||
auto frame_result = vp9_decoder.get_decoded_frame();
|
||||
if (frame_result.is_error()) {
|
||||
if (frame_result.error().category() == Video::DecoderErrorCategory::NeedsMoreInput) {
|
||||
break;
|
||||
}
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
}
|
||||
frame_count++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue