diff --git a/nuget/OpenCvSharp-AnyCPU.nuspec b/nuget/OpenCvSharp-AnyCPU.nuspec index 8a094a695..5315f43d6 100644 --- a/nuget/OpenCvSharp-AnyCPU.nuspec +++ b/nuget/OpenCvSharp-AnyCPU.nuspec @@ -2,15 +2,16 @@ OpenCvSharp-AnyCPU - 2.4.8.20140522 + 2.4.8.20140523 OpenCvSharp shimat http://www.gnu.org/licenses/lgpl-3.0.en.html https://github.com/shimat/opencvsharp - https://raw.githubusercontent.com/shimat/opencvsharp/master/nuget/icon/Girl.jpg + https://raw.githubusercontent.com/shimat/opencvsharp/master/nuget/icon/lenna-icon.png false OpenCV wrapper for .NET Framework - - Changed platform-specific build to AnyCPU build + - Changed platform-specific build to AnyCPU build +- fixed that CRT and ffmpeg are unloaded Copyright 2008-2014 Image Processing OpenCV Wrapper FFI diff --git a/src/OpenCvSharp/Src/PInvoke/NativeMethods.cs b/src/OpenCvSharp/Src/PInvoke/NativeMethods.cs index 50f841545..7ef020c53 100644 --- a/src/OpenCvSharp/Src/PInvoke/NativeMethods.cs +++ b/src/OpenCvSharp/Src/PInvoke/NativeMethods.cs @@ -40,8 +40,12 @@ public static class NativeMethods private static bool? hasQt; #region DLL File Name - + public const string Version = "248"; + + public const string DllMsvcr = "msvcr110"; + public const string DllMsvcp = "msvcp110"; + public const string DllCalib3d = "opencv_calib3d" + Version; public const string DllCore = "opencv_core" + Version; public const string DllFeatures2d = "opencv_features2d" + Version; @@ -54,6 +58,9 @@ public static class NativeMethods public const string DllPhoto = "opencv_photo" + Version; public const string DllVideo = "opencv_video" + Version; + public const string DllFfmpegX86 = "opencv_ffmpeg" + Version; + public const string DllFfmpegX64 = DllFfmpegX86 + "_64"; + #endregion #region Static constructor @@ -98,6 +105,11 @@ public static void LoadLibraries() if (IsUnix()) return; + // msvcr: + WindowsLibraryLoader.Instance.LoadLibrary(DllMsvcr); + // msvcp: msvcr + WindowsLibraryLoader.Instance.LoadLibrary(DllMsvcp); + // core: WindowsLibraryLoader.Instance.LoadLibrary(DllCore); // flann: core @@ -121,6 +133,11 @@ public static void LoadLibraries() WindowsLibraryLoader.Instance.LoadLibrary(DllCalib3d); // legacy: core, flann, imgproc, highgui, features2d, calib3d, ml, video WindowsLibraryLoader.Instance.LoadLibrary(DllLegacy); + + if (IntPtr.Size == 4) + WindowsLibraryLoader.Instance.LoadLibrary(DllFfmpegX86); + else if (IntPtr.Size == 8) + WindowsLibraryLoader.Instance.LoadLibrary(DllFfmpegX64); } ///