From 38fdfb05aec760d44137b8ca09d6dcc2f9f4111f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 10 Apr 2013 11:08:07 +0100 Subject: Fix rounding error when computing padding; add test. --- src/lib/format.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/format.cc b/src/lib/format.cc index 0ca97303e..3ee11a132 100644 --- a/src/lib/format.cc +++ b/src/lib/format.cc @@ -199,7 +199,7 @@ FixedFormat::FixedFormat (int r, libdcp::Size dcp, string id, string n, string d int Format::dcp_padding (shared_ptr f) const { - int p = rint ((_dcp_size.width - (_dcp_size.height * ratio_as_integer(f) / 100.0)) / 2.0); + int p = rint ((_dcp_size.width - (_dcp_size.height * ratio_as_float(f))) / 2.0); /* This comes out -ve for Scope; bodge it */ if (p < 0) { -- cgit v1.2.3