Commit cb5c6259 authored by Max Kellermann's avatar Max Kellermann

decoder/mad: submit MixRamp only if there is actual data

Fixes MixRamp failures when a MP3 file has two ID3 tags, one of them without MixRamp.
parent bf287fef
...@@ -310,7 +310,9 @@ MadDecoder::ParseId3(size_t tagsize, Tag *mpd_tag) noexcept ...@@ -310,7 +310,9 @@ MadDecoder::ParseId3(size_t tagsize, Tag *mpd_tag) noexcept
found_replay_gain = true; found_replay_gain = true;
} }
client->SubmitMixRamp(Id3ToMixRampInfo(id3_tag.get())); if (auto mix_ramp = Id3ToMixRampInfo(id3_tag.get());
mix_ramp.IsDefined())
client->SubmitMixRamp(std::move(mix_ramp));
} }
#else /* !ENABLE_ID3TAG */ #else /* !ENABLE_ID3TAG */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment