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.
This commit is contained in:
parent
bf287fefb5
commit
cb5c6259fd
|
@ -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 */
|
||||||
|
|
Loading…
Reference in New Issue