mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 00:31:14 +00:00
LibAudio: Fix escaped partitions
A missing sign extension and a wrong data type broke these before.
This commit is contained in:
parent
69c42eaf8b
commit
e9e95b1899
Notes:
sideshowbarker
2024-07-17 09:49:48 +09:00
Author: https://github.com/kleinesfilmroellchen Commit: https://github.com/SerenityOS/serenity/commit/e9e95b1899 Pull-request: https://github.com/SerenityOS/serenity/pull/19674
|
@ -923,7 +923,7 @@ ALWAYS_INLINE ErrorOr<Vector<i64>, LoaderError> FlacLoaderPlugin::decode_rice_pa
|
|||
if (k == (1 << partition_type) - 1) {
|
||||
u8 unencoded_bps = TRY(bit_input.read_bits<u8>(5));
|
||||
for (size_t r = 0; r < residual_sample_count; ++r) {
|
||||
rice_partition[r] = TRY(bit_input.read_bits<u8>(unencoded_bps));
|
||||
rice_partition[r] = sign_extend(TRY(bit_input.read_bits<u32>(unencoded_bps)), unencoded_bps);
|
||||
}
|
||||
} else {
|
||||
for (size_t r = 0; r < residual_sample_count; ++r) {
|
||||
|
|
Loading…
Reference in a new issue