X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fconfig.cc;fp=src%2Flib%2Fconfig.cc;h=e0fbcc703f58042948cb3a1dc83aa62d58f09fe3;hp=c9ec730f20aa94c03357b56cbd9398e21698eb46;hb=89115db77729a2c99f1a09ff6a461720e16f889e;hpb=f8ad440cf187c517b7800f3efdfc0954025c4422 diff --git a/src/lib/config.cc b/src/lib/config.cc index c9ec730f2..e0fbcc703 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -38,6 +38,7 @@ using std::ifstream; using std::string; using std::ofstream; using std::list; +using std::max; using boost::shared_ptr; using boost::lexical_cast; using boost::optional; @@ -46,7 +47,7 @@ Config* Config::_instance = 0; /** Construct default configuration */ Config::Config () - : _num_local_encoding_threads (2) + : _num_local_encoding_threads (max (2U, boost::thread::hardware_concurrency())) , _server_port (6192) , _tms_path (N_(".")) , _sound_processor (SoundProcessor::from_id (N_("dolby_cp750")))