From 6070875564b5060fb428a34fd92ae74f4504bd0c Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Mon, 13 Mar 2023 12:40:35 -0400 Subject: [PATCH] LibAudio: Update stream APIs used when reading audio metadata --- Userland/Libraries/LibAudio/VorbisComment.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibAudio/VorbisComment.cpp b/Userland/Libraries/LibAudio/VorbisComment.cpp index 78e211d9e4..3e86a097db 100644 --- a/Userland/Libraries/LibAudio/VorbisComment.cpp +++ b/Userland/Libraries/LibAudio/VorbisComment.cpp @@ -100,7 +100,7 @@ ErrorOr load_vorbis_comment(ByteBuffer const& vorbis_comm auto vendor_length = TRY(stream.read_value>()); Vector raw_vendor_string; TRY(raw_vendor_string.try_resize(vendor_length)); - TRY(stream.read_entire_buffer(raw_vendor_string)); + TRY(stream.read_until_filled(raw_vendor_string)); auto vendor_string = TRY(String::from_utf8(StringView { raw_vendor_string.span() })); Metadata metadata; @@ -111,7 +111,7 @@ ErrorOr load_vorbis_comment(ByteBuffer const& vorbis_comm auto user_comment_length = TRY(stream.read_value>()); Vector raw_user_comment; TRY(raw_user_comment.try_resize(user_comment_length)); - TRY(stream.read_entire_buffer(raw_user_comment)); + TRY(stream.read_until_filled(raw_user_comment)); auto unparsed_user_comment = TRY(String::from_utf8(StringView { raw_user_comment.span() })); TRY(read_vorbis_field(metadata, unparsed_user_comment)); }