Supporters update.
[dcpomatic.git] / src / lib / dcp_content.cc
index e22f69f56c62b8373b58e60dc04fb8d81d311a12..bdd5e0e091c0aa6b523ec7c7400ec9449beef3a0 100644 (file)
@@ -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) {
@@ -830,7 +838,7 @@ DCPContent::kdm_timing_window_valid () const
 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;
        }