summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibAudio/MP3Loader.cpp
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2022-12-05 00:55:19 +0100
committerAndreas Kling <kling@serenityos.org>2022-12-05 17:49:47 +0100
commit312a41fddf05f0560be11ba1b354d45b957794e6 (patch)
treed99dc20e47bde01c24baf4b3c10254635a1aa5ad /Userland/Libraries/LibAudio/MP3Loader.cpp
parentc57be0f47496d2bb23da25224833f9080f9cbcc4 (diff)
downloadserenity-312a41fddf05f0560be11ba1b354d45b957794e6.zip
LibAudio: Use `NonnullOwnPtr` to keep track of LoaderPlugin streams
This doesn't have any immediate uses, but this adapts the code a bit more to `Core::Stream` conventions (as most functions there use NonnullOwnPtr to handle streams) and it makes it a bit clearer that this pointer isn't actually supposed to be null. In fact, MP3LoaderPlugin and FlacLoaderPlugin apparently forgot to check for that completely before starting to decode data.
Diffstat (limited to 'Userland/Libraries/LibAudio/MP3Loader.cpp')
-rw-r--r--Userland/Libraries/LibAudio/MP3Loader.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibAudio/MP3Loader.cpp b/Userland/Libraries/LibAudio/MP3Loader.cpp
index 3cbb014f27..3a28074c0e 100644
--- a/Userland/Libraries/LibAudio/MP3Loader.cpp
+++ b/Userland/Libraries/LibAudio/MP3Loader.cpp
@@ -14,7 +14,7 @@ namespace Audio {
DSP::MDCT<12> MP3LoaderPlugin::s_mdct_12;
DSP::MDCT<36> MP3LoaderPlugin::s_mdct_36;
-MP3LoaderPlugin::MP3LoaderPlugin(OwnPtr<Core::Stream::SeekableStream> stream)
+MP3LoaderPlugin::MP3LoaderPlugin(NonnullOwnPtr<Core::Stream::SeekableStream> stream)
: LoaderPlugin(move(stream))
{
}