CComQIPtr<IDeckLinkConfiguration> configuration_;\r
CComQIPtr<IDeckLinkKeyer> keyer_;\r
\r
+ tbb::spin_mutex exception_mutex_;\r
std::exception_ptr exception_;\r
\r
tbb::atomic<bool> is_running_;\r
}\r
catch(...)\r
{\r
+ tbb::spin_mutex::scoped_lock lock(exception_mutex_);\r
exception_ = std::current_exception();\r
return E_FAIL;\r
}\r
}\r
catch(...)\r
{\r
+ tbb::spin_mutex::scoped_lock lock(exception_mutex_);\r
exception_ = std::current_exception();\r
return E_FAIL;\r
}\r
\r
void send(const safe_ptr<core::read_frame>& frame)\r
{\r
- if(exception_ != nullptr)\r
- std::rethrow_exception(exception_);\r
+ {\r
+ tbb::spin_mutex::scoped_lock lock(exception_mutex_);\r
+ if(exception_ != nullptr)\r
+ std::rethrow_exception(exception_);\r
+ }\r
\r
if(!is_running_)\r
BOOST_THROW_EXCEPTION(caspar_exception() << msg_info(narrow(print()) + " Is not running."));\r