diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-02-26 23:18:15 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-02-26 23:18:15 +0100 |
| commit | d8bbc508e959d8d38c54a6db6cfc868bd64697f5 (patch) | |
| tree | ef165bfcce5daab54b617593a6db7708a2ade444 | |
| parent | 3ffd0163026be24e5373e0674c3301ed37546e44 (diff) | |
Disallow referring to OV audio unless channel counts match (#2780).
| -rw-r--r-- | src/lib/dcp_content.cc | 8 | ||||
| -rw-r--r-- | src/wx/audio_panel.cc | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc index 6185b3a19..bdd5e0e09 100644 --- a/src/lib/dcp_content.cc +++ b/src/lib/dcp_content.cc @@ -720,6 +720,14 @@ DCPContent::can_reference_audio (shared_ptr<const Film> film, string& why_not) c return false; } + if (audio && audio->stream()) { + auto const channels = audio->stream()->channels(); + if (channels != film->audio_channels()) { + why_not = String::compose(_("it has a different number of audio channels than the project; set the project to have %1 channels."), channels); + return false; + } + } + /// TRANSLATORS: this string will follow "Cannot reference this DCP: " return can_reference( film, [](shared_ptr<const Content> c) { diff --git a/src/wx/audio_panel.cc b/src/wx/audio_panel.cc index f0863431a..fcadd0c68 100644 --- a/src/wx/audio_panel.cc +++ b/src/wx/audio_panel.cc @@ -208,6 +208,7 @@ AudioPanel::film_changed (FilmProperty property) case FilmProperty::AUDIO_PROCESSOR: _mapping->set_output_channels (_parent->film()->audio_output_names ()); setup_peak (); + setup_sensitivity(); break; case FilmProperty::VIDEO_FRAME_RATE: setup_description (); |
