From f82bdaa6ffe1a9e62a010de405f8bbb7ea392f00 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 20 Jul 2018 15:20:56 +0100 Subject: Add advanced configuration option to allow any container ratio, specifically because the GDC SX-2001 will only play 25fps DCPs with a 16:9 ratio (not Flat). https://www.dcpomatic.com/forum/viewtopic.php?f=2&t=1119&p=4470 --- src/lib/ratio.cc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/lib/ratio.cc') diff --git a/src/lib/ratio.cc b/src/lib/ratio.cc index eae12b061..8a86ced59 100644 --- a/src/lib/ratio.cc +++ b/src/lib/ratio.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2015 Carl Hetherington + Copyright (C) 2013-2018 Carl Hetherington This file is part of DCP-o-matic. @@ -20,6 +20,7 @@ #include "ratio.h" #include "util.h" +#include "config.h" #include #include @@ -102,6 +103,10 @@ Ratio::nearest_from_ratio (float r) vector Ratio::containers () { + if (Config::instance()->allow_any_container()) { + return _ratios; + } + vector r; r.push_back (Ratio::from_id ("185")); r.push_back (Ratio::from_id ("239")); @@ -112,6 +117,12 @@ Ratio::containers () string Ratio::container_nickname () const { - DCPOMATIC_ASSERT (_container_nickname); + if (!_container_nickname) { + /* Fall back to the image nickname; this just for when non-standard container + ratios are enabled. + */ + return _image_nickname; + } + return *_container_nickname; } -- cgit v1.2.3