1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:17:35 +00:00

LibVideo/VP9: Return Corrupted error when tile range decoder init fails

Previously, we were incorrectly wrapping an error from `BooleanDecoder`
initialization in a `DecoderErrorCategory::Memory` error. This caused
an incorrect error message in VideoPlayer. Now it will instead return
`DecoderErrorCategory::Corrupted`.
This commit is contained in:
Zaggy1024 2023-02-14 04:27:48 -06:00 committed by Jelle Raaijmakers
parent b6deb8fd42
commit 8ce4245214
2 changed files with 8 additions and 7 deletions

View file

@ -888,7 +888,7 @@ DecoderErrorOr<void> Parser::decode_tiles(FrameContext& frame_context)
auto above_non_zero_tokens_view = create_non_zero_tokens_view(above_non_zero_tokens, blocks_to_sub_blocks(columns_start), blocks_to_sub_blocks(columns_end - columns_start), frame_context.color_config.subsampling_x);
auto above_segmentation_ids_for_tile = safe_slice(above_segmentation_ids.span(), columns_start, columns_end - columns_start);
auto tile_context = DECODER_TRY_ALLOC(TileContext::try_create(frame_context, tile_size, rows_start, rows_end, columns_start, columns_end, above_partition_context_for_tile, above_non_zero_tokens_view, above_segmentation_ids_for_tile));
auto tile_context = TRY(TileContext::try_create(frame_context, tile_size, rows_start, rows_end, columns_start, columns_end, above_partition_context_for_tile, above_non_zero_tokens_view, above_segmentation_ids_for_tile));
TRY(decode_tile(tile_context));
TRY_READ(frame_context.bit_stream.discard(tile_size));
}