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) {
} catch (dcp::ReadError &) {
/* We couldn't read the DCP, so it's probably missing */
return false;
+ } catch (DCPError &) {
+ /* We couldn't read the DCP, so it's probably missing */
+ return false;
} catch (dcp::KDMDecryptionError &) {
/* We have an incorrect KDM */
return false;
Resolution
DCPContent::resolution () const
{
- if (video->size().width > 2048 || video->size().height > 1080) {
+ if (video->size() && (video->size()->width > 2048 || video->size()->height > 1080)) {
return Resolution::FOUR_K;
}