Disallow refer if the film frame size is not the same as the DCP (#963).
authorCarl Hetherington <cth@carlh.net>
Mon, 26 Sep 2016 11:41:08 +0000 (12:41 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 26 Sep 2016 11:41:08 +0000 (12:41 +0100)
ChangeLog
src/lib/dcp_content.cc
src/wx/video_panel.cc

index 46f74aeea4c5606ed445e33c88ab78184658a080..9454fb1d9d116c447e33dcbd3d15f7024dc11f2e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2016-09-26  c.hetherington  <cth@carlh.net>
 
+       * Disallow refer-to-DCP if the video frame size is different to that in the project (#963).
+
        * Fix multi-select in the timeline (#954).
 
        * Add option to Windows installer to add desktop shortcuts (#965).
index 96e9f17a259f44e11b3b81859d0422b33308e6c0..1f844541c607820feee43d5a8b16da94be6dc239 100644 (file)
@@ -444,6 +444,11 @@ DCPContent::can_reference (function<shared_ptr<ContentPart> (shared_ptr<const Co
 bool
 DCPContent::can_reference_video (list<string>& why_not) const
 {
+       if (film()->frame_size() != video->size()) {
+               why_not.push_back (_("The video frame size in the film differs from that in the DCP."));
+               return false;
+       }
+
        return can_reference (bind (&Content::video, _1), _("There is other video content overlapping this DCP; remove it."), why_not);
 }
 
@@ -458,7 +463,7 @@ DCPContent::can_reference_audio (list<string>& why_not) const
                 }
         }
 
-        return can_reference (bind (&Content::audio, _1),   _("There is other audio content overlapping this DCP; remove it."), why_not);
+        return can_reference (bind (&Content::audio, _1), _("There is other audio content overlapping this DCP; remove it."), why_not);
 }
 
 bool
index 177799208a2877d457bf66799638d66ca5e440f5..6f9efef61dc8e5f81b73a52958d260e694accee3 100644 (file)
@@ -253,10 +253,10 @@ VideoPanel::film_changed (Film::Property property)
 {
        switch (property) {
        case Film::VIDEO_FRAME_RATE:
+       case Film::CONTAINER:
                setup_description ();
                setup_sensitivity ();
                break;
-       case Film::CONTAINER:
        case Film::RESOLUTION:
                setup_description ();
                break;