X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fencoder.cc;h=a1c02479936d00fbb2af25f9f81cf04ae35fe539;hb=74a8d26a8907c6e00e29f054178a3425f44e38ed;hp=0c7434220812551e44ef8e4c72601e692538f603;hpb=c2909b61d360510241ef37abd255269bd8aa9526;p=dcpomatic.git diff --git a/src/lib/encoder.cc b/src/lib/encoder.cc index 0c7434220..a1c024799 100644 --- a/src/lib/encoder.cc +++ b/src/lib/encoder.cc @@ -71,12 +71,12 @@ void Encoder::process_begin () { for (int i = 0; i < Config::instance()->num_local_encoding_threads (); ++i) { - _threads.push_back (new boost::thread (boost::bind (&Encoder::encoder_thread, this, (ServerDescription *) 0))); + _threads.push_back (new boost::thread (boost::bind (&Encoder::encoder_thread, this, shared_ptr ()))); } - vector servers = Config::instance()->servers (); + vector > servers = Config::instance()->servers (); - for (vector::iterator i = servers.begin(); i != servers.end(); ++i) { + for (vector >::iterator i = servers.begin(); i != servers.end(); ++i) { for (int j = 0; j < (*i)->threads (); ++j) { _threads.push_back (new boost::thread (boost::bind (&Encoder::encoder_thread, this, *i))); } @@ -244,7 +244,7 @@ Encoder::terminate_threads () } void -Encoder::encoder_thread (ServerDescription* server) +Encoder::encoder_thread (shared_ptr server) { /* Number of seconds that we currently wait between attempts to connect to the server; not relevant for localhost