Resolve export format ambiguities

This fixes an issue when switching formats.
ExportFormatDialog::update_selection iterates e.g. WAV BWV.
If BWV was selected and a user selects WAV the following happpens

1. WAV is selected
2. BWV is deselected
3. Since BWF and WAV are the same format, ExportFormatManager
   deselects WAV
This commit is contained in:
Robin Gareus
2022-12-06 17:30:43 +01:00
parent e7b0df0231
commit 89d8dc26dd

View File

@@ -480,7 +480,11 @@ ExportFormatManager::change_format_selection (bool select, WeakExportFormatPtr c
if (select) {
select_format (ptr);
} else if (ptr->get_format_id() == current_selection->format_id()) {
} else if (ptr->get_format_id() == current_selection->format_id() &&
// BWF has the same format id with wav, so we need to check this.
ptr->has_broadcast_info () == current_selection->has_broadcast_info () &&
// Ogg can be Vorbis or OPUS
(ptr->get_format_id () != ExportFormatBase::F_Ogg || (ptr->get_explicit_sample_format () == current_selection->sample_format ()))) {
ptr.reset();
select_format (ptr);
}