From 7fff07c57da3869e579d6492fc015bbbeef3f9b2 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 17 Oct 2013 15:28:54 +0100 Subject: [PATCH] Forward-port 1e6 -> 1000000 fix from master. --- ChangeLog | 6 ++++++ src/wx/config_dialog.cc | 4 ++-- src/wx/film_editor.cc | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 30c828181..431b139b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-10-17 Carl Hetherington + + * Forward-port fix from master; use 1000000 rather + than 1e6 for J2K bandwidth arithmetic to ensure + that it's done with integers. + 2013-10-16 Carl Hetherington * Version 1.17 released. diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc index d6bc965db..5479c22ce 100644 --- a/src/wx/config_dialog.cc +++ b/src/wx/config_dialog.cc @@ -224,7 +224,7 @@ ConfigDialog::make_misc_panel () _default_dcp_content_type->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&ConfigDialog::default_dcp_content_type_changed, this)); _default_j2k_bandwidth->SetRange (50, 250); - _default_j2k_bandwidth->SetValue (config->default_j2k_bandwidth() / 1e6); + _default_j2k_bandwidth->SetValue (config->default_j2k_bandwidth() / 1000000); _default_j2k_bandwidth->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&ConfigDialog::default_j2k_bandwidth_changed, this)); } @@ -445,7 +445,7 @@ ConfigDialog::creator_changed () void ConfigDialog::default_j2k_bandwidth_changed () { - Config::instance()->set_default_j2k_bandwidth (_default_j2k_bandwidth->GetValue() * 1e6); + Config::instance()->set_default_j2k_bandwidth (_default_j2k_bandwidth->GetValue() * 1000000); } static std::string diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc index d50216258..f2514da51 100644 --- a/src/wx/film_editor.cc +++ b/src/wx/film_editor.cc @@ -315,7 +315,7 @@ FilmEditor::j2k_bandwidth_changed () return; } - _film->set_j2k_bandwidth (_j2k_bandwidth->GetValue() * 1e6); + _film->set_j2k_bandwidth (_j2k_bandwidth->GetValue() * 1000000); } void @@ -423,7 +423,7 @@ FilmEditor::film_changed (Film::Property p) setup_dcp_name (); break; case Film::J2K_BANDWIDTH: - checked_set (_j2k_bandwidth, double (_film->j2k_bandwidth()) / 1e6); + checked_set (_j2k_bandwidth, double (_film->j2k_bandwidth()) / 1000000); break; case Film::USE_DCI_NAME: checked_set (_use_dci_name, _film->use_dci_name ()); -- 2.30.2