merge
2 files changed, 4 insertions(+), 9 deletions(-)

M PAF.h
M mmfspackle.cpp
M PAF.h +1 -1
@@ 59,7 59,7 @@ namespace PAF {
 		T* s;
 	public:
 		template <typename U> Shared(const Shared<U>& src):s(src.s) { if (s) s->Retain(); }
-		template <typename U> Shared(Shared<U>&& src) : s(src.s) { src.s = nullptr; }
+		template <typename U> Shared(Shared<U>&& src) : s(nullptr) { std::swap(s, src.s); }
 		template <typename... ARGS> Shared(ARGS&&... as) : s(T::Construct(std::forward<ARGS>(as)...)) { if (s) s->Retain(); }
 		~Shared() { if (s) s->Release(); }
 		Shared<T>& operator=(Shared<T> from) { std::swap(s, from.s); return *this; }

          
M mmfspackle.cpp +3 -8
@@ 31,18 31,13 @@ namespace MF {
 		}
 
 		~Initializer( ) {
-			MFShutdown();
+			//MFShutdown();
 			//CoUninitialize( );
 		}
 	};
 
 	static void Init( ) {
-		static std::vector<Initializer> inits;
-		static thread_local bool didInitialize = false;
-		if (didInitialize == false) {
-			inits.emplace_back( );
-			didInitialize = true;
-		}
+		static Initializer init;
 	}
 
 	std::wstring_convert<std::codecvt_utf8_utf16<TCHAR>> utf8cvt;

          
@@ 144,7 139,7 @@ namespace MF {
 	}
 
 	SourceReader::SourceReader(const wchar_t* url) {
-		Init( );
+			Init( );
 			CHECK(MFCreateSourceReaderFromURL(url, nullptr, &p));
 		}