Skip to content

Commit

Permalink
output/Source: add assert(filter)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Nov 8, 2024
1 parent a7a61e9 commit 4d8a2ea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/output/Source.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ AudioOutputSource::GetChunkData(const MusicChunk &chunk,
inline std::span<const std::byte>
AudioOutputSource::FilterChunk(const MusicChunk &chunk)
{
assert(filter);

auto data = GetChunkData(chunk, replay_gain_filter.get(),
&replay_gain_serial);
if (data.empty())
Expand Down Expand Up @@ -197,6 +199,8 @@ AudioOutputSource::FilterChunk(const MusicChunk &chunk)
bool
AudioOutputSource::Fill(Mutex &mutex)
{
assert(filter);

if (current_chunk != nullptr && pending_tag == nullptr &&
pending_data.empty())
DropCurrentChunk();
Expand Down

0 comments on commit 4d8a2ea

Please sign in to comment.