1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:58:12 +00:00

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.
This commit is contained in:
Tim Schumacher 2022-12-05 00:55:19 +01:00 committed by Andreas Kling
parent c57be0f474
commit 312a41fddf
8 changed files with 9 additions and 15 deletions

View file

@ -11,7 +11,7 @@
namespace Audio {
LoaderPlugin::LoaderPlugin(OwnPtr<Core::Stream::SeekableStream> stream)
LoaderPlugin::LoaderPlugin(NonnullOwnPtr<Core::Stream::SeekableStream> stream)
: m_stream(move(stream))
{
}