1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-09 09:34:57 +09:00

LibAudio: Use InputMemoryStream instead of BufferStream.

This commit is contained in:
asynts 2020-09-19 18:32:17 +02:00 committed by Andreas Kling
parent ae9f0e1cd8
commit fa43bf92e4
Notes: sideshowbarker 2024-07-19 02:18:51 +09:00
3 changed files with 12 additions and 21 deletions

View file

@ -93,7 +93,6 @@ public:
return m_bytes[m_offset];
}
// LEB128 is a variable-length encoding for integers
bool read_LEB128_unsigned(size_t& result)
{
const auto backup = m_offset;
@ -101,8 +100,6 @@ public:
result = 0;
size_t num_bytes = 0;
while (true) {
// Note. The implementation in AK::BufferStream::read_LEB128_unsigned read one
// past the end, this is fixed here.
if (eof()) {
m_offset = backup;
set_recoverable_error();
@ -120,7 +117,6 @@ public:
return true;
}
// LEB128 is a variable-length encoding for integers
bool read_LEB128_signed(ssize_t& result)
{
const auto backup = m_offset;
@ -130,8 +126,6 @@ public:
u8 byte = 0;
do {
// Note. The implementation in AK::BufferStream::read_LEB128_unsigned read one
// past the end, this is fixed here.
if (eof()) {
m_offset = backup;
set_recoverable_error();