summaryrefslogtreecommitdiff
path: root/src/lib/format.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/format.cc')
-rw-r--r--src/lib/format.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/format.cc b/src/lib/format.cc
index 21f8fb9a2..addab2b60 100644
--- a/src/lib/format.cc
+++ b/src/lib/format.cc
@@ -29,6 +29,7 @@
#include <iostream>
#include "format.h"
#include "film.h"
+#include "playlist.h"
#include "i18n.h"
@@ -195,14 +196,14 @@ FixedFormat::FixedFormat (int r, libdcp::Size dcp, string id, string n, string d
int
Format::dcp_padding (shared_ptr<const Film> f) const
{
- int p = rint ((_dcp_size.width - (_dcp_size.height * ratio_as_integer(f) / 100.0)) / 2.0);
+ int pad = rint ((_dcp_size.width - (_dcp_size.height * ratio_as_integer(f) / 100.0)) / 2.0);
/* This comes out -ve for Scope; bodge it */
- if (p < 0) {
- p = 0;
+ if (pad < 0) {
+ pad = 0;
}
- return p;
+ return pad;
}
float
@@ -226,7 +227,7 @@ VariableFormat::ratio_as_integer (shared_ptr<const Film> f) const
float
VariableFormat::ratio_as_float (shared_ptr<const Film> f) const
{
- return float (f->size().width) / f->size().height;
+ return float (f->video_size().width) / f->video_size().height;
}
/** @return A name to be presented to the user */