output/Source: reset the ReplayGain serials ion OpenFilter()
Each close/open cycle resets the Filter's state, because a new Filter instance is being created. That results in the serials (replay_gain_serial and other_replay_gain_serial) being out of sync with the internal ReplayGainFilter state. So instead of initializing those serials once, we need to initialize them each time we create new ReplayGainFilter instances, i.e. in OpenFilter(). https://bugs.musicpd.org/view.php?id=4632
This commit is contained in:
@@ -95,13 +95,17 @@ try {
|
||||
assert(audio_format.IsValid());
|
||||
|
||||
/* the replay_gain filter cannot fail here */
|
||||
if (prepared_replay_gain_filter != nullptr)
|
||||
if (prepared_replay_gain_filter != nullptr) {
|
||||
replay_gain_serial = 0;
|
||||
replay_gain_filter_instance =
|
||||
prepared_replay_gain_filter->Open(audio_format);
|
||||
}
|
||||
|
||||
if (prepared_other_replay_gain_filter != nullptr)
|
||||
if (prepared_other_replay_gain_filter != nullptr) {
|
||||
other_replay_gain_serial = 0;
|
||||
other_replay_gain_filter_instance =
|
||||
prepared_other_replay_gain_filter->Open(audio_format);
|
||||
}
|
||||
|
||||
filter_instance = prepared_filter->Open(audio_format);
|
||||
} catch (...) {
|
||||
|
Reference in New Issue
Block a user