X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fdcp_content.cc;fp=src%2Flib%2Fdcp_content.cc;h=bdd5e0e091c0aa6b523ec7c7400ec9449beef3a0;hp=6185b3a19db2cfbd4e49474794b3b3057154022a;hb=d8bbc508e959d8d38c54a6db6cfc868bd64697f5;hpb=3ffd0163026be24e5373e0674c3301ed37546e44 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 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 c) {