X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_content.cc;fp=src%2Flib%2Fdcp_content.cc;h=c459a9ece6e099aa82d9a09ac50cfbef72f6d3a8;hb=80313b07095814f0178be70bc0651c1e052decea;hp=378ba18827e7ccd32b8bfe1946cfd8e8b77f2a26;hpb=82f87c7711fb664b06b04d44792ed3820b3d1e01;p=dcpomatic.git diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc index 378ba1882..c459a9ece 100644 --- a/src/lib/dcp_content.cc +++ b/src/lib/dcp_content.cc @@ -723,6 +723,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; + } + } + auto part = [](shared_ptr c) { return static_cast(c->audio) && !c->audio->mapping().mapped_output_channels().empty(); };