]> git.sesse.net Git - casparcg/commitdiff
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches...
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Fri, 21 Jan 2011 23:57:23 +0000 (23:57 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Fri, 21 Jan 2011 23:57:23 +0000 (23:57 +0000)
core/consumer/oal/oal_consumer.cpp
core/producer/layer.cpp

index 3d47bfe86404e21e1d16088a756eec680a40e0c8..200f2af892bff75ea93a88e497acdb256d6538c7 100644 (file)
@@ -46,10 +46,10 @@ public:
 \r
        ~implementation()\r
        {\r
-               Stop();\r
                is_running_ = false;\r
                input_.try_push(std::vector<short>());\r
                input_.try_push(std::vector<short>());\r
+               Stop();\r
                CASPAR_LOG(info) << "Sucessfully ended oal_consumer";\r
        }\r
 \r
index e2de193c24301aabdbfd822cccdabb550c32ede8..698aa4931a0eda999920374a9017f3b7a5fb97bc 100644 (file)
@@ -112,15 +112,17 @@ layer::layer()
 {\r
        impl_ = new implementation();\r
 }\r
-layer::layer(layer&& other) : impl_(std::move(other.impl_)){other.impl_ = nullptr;}\r
+layer::layer(layer&& other) \r
+{\r
+       impl_ = other.impl_.compare_and_swap(nullptr, other.impl_);\r
+}\r
 layer::~layer()\r
 {\r
        delete impl_.fetch_and_store(nullptr);\r
 }\r
 layer& layer::operator=(layer&& other)\r
 {\r
-       impl_ = std::move(other.impl_); \r
-       other.impl_ = nullptr;\r
+       impl_ = other.impl_.compare_and_swap(nullptr, other.impl_);\r
        return *this;\r
 }\r
 void layer::swap(layer& other)\r