Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/filters/transform/VSFilter')
-rw-r--r--src/filters/transform/VSFilter/Copy.cpp13
-rw-r--r--src/filters/transform/VSFilter/DirectVobSub.cpp8
-rw-r--r--src/filters/transform/VSFilter/DirectVobSub.h5
-rw-r--r--src/filters/transform/VSFilter/DirectVobSubFilter.cpp25
-rw-r--r--src/filters/transform/VSFilter/DirectVobSubPropPage.cpp2
-rw-r--r--src/filters/transform/VSFilter/VSFilter.cpp6
-rw-r--r--src/filters/transform/VSFilter/VSFilter.vcxproj91
-rw-r--r--src/filters/transform/VSFilter/VSFilter.vcxproj.filters2
-rw-r--r--src/filters/transform/VSFilter/installer/vsfilter_setup.iss8
-rw-r--r--src/filters/transform/VSFilter/plugins.cpp10
10 files changed, 53 insertions, 117 deletions
diff --git a/src/filters/transform/VSFilter/Copy.cpp b/src/filters/transform/VSFilter/Copy.cpp
index b6c65e0d8..383c3f986 100644
--- a/src/filters/transform/VSFilter/Copy.cpp
+++ b/src/filters/transform/VSFilter/Copy.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2015 see Authors.txt
+ * (C) 2006-2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -27,7 +27,6 @@
#include "../../../DSUtil/DSUtil.h"
#include "../../../DSUtil/MediaTypes.h"
-#include <InitGuid.h>
#include "moreuuids.h"
extern int c2y_yb[256];
@@ -184,10 +183,10 @@ void CDirectVobSubFilter::PrintMessages(BYTE* pOut)
bihOut.biWidth, bihOut.biHeight,
Subtype2String(m_pOutput->CurrentMediaType().subtype));
- msg.AppendFormat(_T("real fps: %.3f, current fps: %.3f\nmedia time: %d, subtitle time: %I64d [ms]\nframe number: %d (calculated)\nrate: %.4lf\n"),
+ msg.AppendFormat(_T("real fps: %.3f, current fps: %.3f\nmedia time: %I64d, subtitle time: %I64d [ms]\nframe number: %I64d (calculated)\nrate: %.4lf\n"),
m_fps, m_fMediaFPSEnabled ? m_MediaFPS : fabs(m_fps),
- m_tPrev.Millisecs(), CalcCurrentTime() / 10000,
- (int)(m_tPrev.m_time * m_fps / 10000000),
+ RT2MS(m_tPrev.GetUnits()), RT2MS(CalcCurrentTime()),
+ std::llround(m_tPrev.m_time * m_fps / UNITS_FLOAT),
m_pInput->CurrentRate());
CAutoLock cAutoLock(&m_csQueueLock);
@@ -196,11 +195,11 @@ void CDirectVobSubFilter::PrintMessages(BYTE* pOut)
int nSubPics = -1;
REFERENCE_TIME rtNow = -1, rtStart = -1, rtStop = -1;
m_pSubPicQueue->GetStats(nSubPics, rtNow, rtStart, rtStop);
- msg.AppendFormat(_T("queue stats: %I64d - %I64d [ms]\n"), rtStart / 10000, rtStop / 10000);
+ msg.AppendFormat(_T("queue stats: %I64d - %I64d [ms]\n"), RT2MS(rtStart), RT2MS(rtStop));
for (int i = 0; i < nSubPics; i++) {
m_pSubPicQueue->GetStats(i, rtStart, rtStop);
- msg.AppendFormat(_T("%d: %I64d - %I64d [ms]\n"), i, rtStart / 10000, rtStop / 10000);
+ msg.AppendFormat(_T("%d: %I64d - %I64d [ms]\n"), i, RT2MS(rtStart), RT2MS(rtStop));
}
}
diff --git a/src/filters/transform/VSFilter/DirectVobSub.cpp b/src/filters/transform/VSFilter/DirectVobSub.cpp
index f8cdc9b1c..e264644a2 100644
--- a/src/filters/transform/VSFilter/DirectVobSub.cpp
+++ b/src/filters/transform/VSFilter/DirectVobSub.cpp
@@ -55,6 +55,10 @@ CDirectVobSub::CDirectVobSub()
m_fMediaFPSEnabled = !!theApp.GetProfileInt(ResStr(IDS_R_TIMING), ResStr(IDS_RTM_MEDIAFPSENABLED), FALSE);
m_ePARCompensationType = static_cast<CSimpleTextSubtitle::EPARCompensationType>(theApp.GetProfileInt(ResStr(IDS_R_TEXT), ResStr(IDS_RT_AUTOPARCOMPENSATION), 0));
+ int gcd = GCD(m_SubtitleSpeedMul, m_SubtitleSpeedDiv);
+ m_SubtitleSpeedNormalizedMul = m_SubtitleSpeedMul / gcd;
+ m_SubtitleSpeedNormalizedDiv = m_SubtitleSpeedDiv / gcd;
+
BYTE* pData = nullptr;
UINT nSize;
if (theApp.GetProfileBinary(ResStr(IDS_R_TIMING), ResStr(IDS_RTM_MEDIAFPS), &pData, &nSize) && pData) {
@@ -459,6 +463,10 @@ STDMETHODIMP CDirectVobSub::put_SubtitleTiming(int delay, int speedmul, int spee
m_SubtitleSpeedDiv = speeddiv;
}
+ int gcd = GCD(m_SubtitleSpeedMul, m_SubtitleSpeedDiv);
+ m_SubtitleSpeedNormalizedMul = m_SubtitleSpeedMul / gcd;
+ m_SubtitleSpeedNormalizedDiv = m_SubtitleSpeedDiv / gcd;
+
return S_OK;
}
diff --git a/src/filters/transform/VSFilter/DirectVobSub.h b/src/filters/transform/VSFilter/DirectVobSub.h
index 6282020c3..9321f6ae9 100644
--- a/src/filters/transform/VSFilter/DirectVobSub.h
+++ b/src/filters/transform/VSFilter/DirectVobSub.h
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -49,6 +49,9 @@ protected:
bool m_fOSD;
int m_nReloaderDisableCount;
int m_SubtitleDelay, m_SubtitleSpeedMul, m_SubtitleSpeedDiv;
+ // User could specify any values for m_SubtitleSpeedMul and m_SubtitleSpeedDiv.
+ // We want to normalize the user input to minimize the chance of overflow later when we do calculations.
+ int m_SubtitleSpeedNormalizedMul, m_SubtitleSpeedNormalizedDiv;
bool m_fMediaFPSEnabled;
double m_MediaFPS;
bool m_fSaveFullPath;
diff --git a/src/filters/transform/VSFilter/DirectVobSubFilter.cpp b/src/filters/transform/VSFilter/DirectVobSubFilter.cpp
index beefbdeac..9c22beab1 100644
--- a/src/filters/transform/VSFilter/DirectVobSubFilter.cpp
+++ b/src/filters/transform/VSFilter/DirectVobSubFilter.cpp
@@ -34,7 +34,6 @@
#include "../../../Subtitles/RLECodedSubtitle.h"
#include "../../../Subtitles/PGSSub.h"
-#include <InitGuid.h>
#include <d3d9.h>
#include <dxva2api.h>
#include "moreuuids.h"
@@ -518,7 +517,7 @@ HRESULT CDirectVobSubFilter::NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tS
REFERENCE_TIME CDirectVobSubFilter::CalcCurrentTime()
{
REFERENCE_TIME rt = m_pSubClock ? m_pSubClock->GetTime() : m_tPrev;
- return (rt - 10000i64 * m_SubtitleDelay) * m_SubtitleSpeedMul / m_SubtitleSpeedDiv; // no, it won't overflow if we use normal parameters (__int64 is enough for about 2000 hours if we multiply it by the max: 65536 as m_SubtitleSpeedMul)
+ return (rt - 10000i64 * m_SubtitleDelay) * m_SubtitleSpeedNormalizedMul / m_SubtitleSpeedNormalizedDiv; // no, it won't overflow if we use normal parameters (__int64 is enough for about 2000 hours if we multiply it by the max: 65536 as m_SubtitleSpeedMul)
}
void CDirectVobSubFilter::InitSubPicQueue()
@@ -743,7 +742,7 @@ void CDirectVobSubFilter::UpdatePreferedLanguages(CString l)
// move "Hide subtitles" to the last position if it wasn't our selection
- CString hidesubs = ResStr(IDS_M_HIDESUBTITLES);
+ CString hidesubs(StrRes(IDS_M_HIDESUBTITLES));
for (k = 1; k < j; k++) {
if (!langs[k].CompareNoCase(hidesubs)) {
@@ -1355,18 +1354,22 @@ bool CDirectVobSubFilter2::IsAppBlackListed()
_T("wm8eutil."), // wmp8 encoder's dummy renderer releases the outputted media sample after calling Receive on its input pin (yes, even when dvobsub isn't registered at all)
_T("explorer."), // as some users reported thumbnail preview loads dvobsub, I've never experienced this yet...
_T("producer."), // this is real's producer
- _T("googledesktopindex."), // Google Desktop
- _T("googledesktopdisplay."), // Google Desktop
- _T("googledesktopcrawl."), // Google Desktop
- _T("subtitleworkshop."), // Subtitle Workshop
- _T("subtitleworkshop4."),
+ _T("googledesktop"), // Google Desktop
+ _T("subtitleworkshop"), // Subtitle Workshop
_T("darksouls."), // Dark Souls (Game)
_T("rometw."), // Rome Total War (Game)
_T("everquest2."), // EverQuest II (Game)
_T("yso_win."), // Ys Origin (Game)
_T("launcher_main."), // Logitech WebCam Software
- _T("webcamdell2."), // Dell WebCam Software
+ _T("webcamdell"), // Dell WebCam Software
_T("data."), // Dark Souls 1 (Game)
+ _T("unravel"), // Unravel (Game)
+ _T("mshta"), // MS Scripting Host
+#if WIN64
+ _T("ridex64.exe"), // Ride (Game)
+#else
+ _T("ride.exe"), // Ride (Game)
+#endif
};
for (size_t i = 0; i < _countof(blacklistedapps); i++) {
@@ -1592,10 +1595,10 @@ void CDirectVobSubFilter::UpdateSubtitle()
void CDirectVobSubFilter::SetSubtitle(ISubStream* pSubStream)
{
- CAutoLock cAutolock(&m_csQueueLock);
+ CAutoLock cQueueLock(&m_csQueueLock);
if (pSubStream) {
- CAutoLock cAutolock(&m_csSubLock);
+ CAutoLock cSubLock(&m_csSubLock);
CLSID clsid;
pSubStream->GetClassID(&clsid);
diff --git a/src/filters/transform/VSFilter/DirectVobSubPropPage.cpp b/src/filters/transform/VSFilter/DirectVobSubPropPage.cpp
index 828b20bdf..ff115406a 100644
--- a/src/filters/transform/VSFilter/DirectVobSubPropPage.cpp
+++ b/src/filters/transform/VSFilter/DirectVobSubPropPage.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2014, 2016 see Authors.txt
*
* This file is part of MPC-HC.
*
diff --git a/src/filters/transform/VSFilter/VSFilter.cpp b/src/filters/transform/VSFilter/VSFilter.cpp
index 8da330ec3..b5e740b8e 100644
--- a/src/filters/transform/VSFilter/VSFilter.cpp
+++ b/src/filters/transform/VSFilter/VSFilter.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -24,9 +24,7 @@
#include "DirectVobSubPropPage.h"
#include "VSFilter.h"
#include "../../../DSUtil/MediaTypes.h"
-#include "../../../MathLibFix/MathLibFix.h"
-#include <InitGuid.h>
#include "moreuuids.h"
/////////////////////////////////////////////////////////////////////////////
@@ -47,8 +45,6 @@ BOOL CVSFilterApp::InitInstance()
return FALSE;
}
- WorkAroundMathLibraryBug();
-
SetRegistryKey(_T("MPC-HC"));
DllEntryPoint(AfxGetInstanceHandle(), DLL_PROCESS_ATTACH, 0); // "DllMain" of the dshow baseclasses
diff --git a/src/filters/transform/VSFilter/VSFilter.vcxproj b/src/filters/transform/VSFilter/VSFilter.vcxproj
index c521cf4b7..f6667556a 100644
--- a/src/filters/transform/VSFilter/VSFilter.vcxproj
+++ b/src/filters/transform/VSFilter/VSFilter.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug Filter|Win32">
<Configuration>Debug Filter</Configuration>
@@ -26,22 +26,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="..\..\..\platform.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>Static</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>Static</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
@@ -49,73 +34,18 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\..\..\common.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\common.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ISOLATION_AWARE_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;Version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>VSFilter.def</ModuleDefinitionFile>
- </Link>
- <Manifest>
- <AdditionalManifestFiles>$(ProjectDir)res\VSFilter.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
- </Manifest>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Filter|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ISOLATION_AWARE_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;Version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>VSFilter.def</ModuleDefinitionFile>
- </Link>
- <Manifest>
- <AdditionalManifestFiles>$(ProjectDir)res\VSFilter.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
- </Manifest>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>ISOLATION_AWARE_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>Vfw32.lib;Version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <ModuleDefinitionFile>VSFilter.def</ModuleDefinitionFile>
- </Link>
- <Manifest>
- <AdditionalManifestFiles>$(ProjectDir)res\VSFilter.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
- </Manifest>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Filter|x64'">
+ <ItemDefinitionGroup>
<ClCompile>
+ <!--
+ Remove /Zc:threadSafeInit- once Windows XP in no longer supported. TLS doesn't work on this system with dynamically loaded libraries.
+ And it will not be fixed. https://connect.microsoft.com/VisualStudio/feedback/details/1789709
+ -->
+ <AdditionalOptions>/Zc:threadSafeInit- %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>..\..\..\..\include;..\..\..\thirdparty;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>ISOLATION_AWARE_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
@@ -180,9 +110,6 @@
<ProjectReference Include="..\..\..\DSUtil\DSUtil.vcxproj">
<Project>{fc70988b-1ae5-4381-866d-4f405e28ac42}</Project>
</ProjectReference>
- <ProjectReference Include="..\..\..\MathLibFix\MathLibFix.vcxproj">
- <Project>{fc9fc17f-70bf-4aca-8285-c24d1889bacb}</Project>
- </ProjectReference>
<ProjectReference Include="..\..\..\SubPic\SubPic.vcxproj">
<Project>{d514ea4d-eafb-47a9-a437-a582ca571251}</Project>
</ProjectReference>
diff --git a/src/filters/transform/VSFilter/VSFilter.vcxproj.filters b/src/filters/transform/VSFilter/VSFilter.vcxproj.filters
index 0c975605b..e1d250d9e 100644
--- a/src/filters/transform/VSFilter/VSFilter.vcxproj.filters
+++ b/src/filters/transform/VSFilter/VSFilter.vcxproj.filters
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{6d1c2595-a734-4727-a302-743496e0d217}</UniqueIdentifier>
diff --git a/src/filters/transform/VSFilter/installer/vsfilter_setup.iss b/src/filters/transform/VSFilter/installer/vsfilter_setup.iss
index 96506b364..a78b9f5fc 100644
--- a/src/filters/transform/VSFilter/installer/vsfilter_setup.iss
+++ b/src/filters/transform/VSFilter/installer/vsfilter_setup.iss
@@ -1,4 +1,4 @@
-; (C) 2012-2015 see Authors.txt
+; (C) 2012-2017 see Authors.txt
;
; This file is part of MPC-HC.
;
@@ -20,8 +20,8 @@
; Inno Setup: http://www.jrsoftware.org/isdl.php
-#if VER < EncodeVer(5,5,4)
- #error Update your Inno Setup version (5.5.4 or newer)
+#if VER < EncodeVer(5,5,7)
+ #error Update your Inno Setup version (5.5.7 or newer)
#endif
; If you want to compile the 64-bit version define "x64Build" (uncomment the define below or use build.bat)
@@ -36,7 +36,7 @@
#include AddBackslash(top_dir) + "include\mpc-hc_config.h"
#include AddBackslash(top_dir) + "include\version.h"
-#define copyright_str "2001-2015"
+#define copyright_str "2001-2017"
#define app_name "VSFilter"
#define app_version str(VerMajor) + "." + str(VerMinor) + "." + str(MPC_VERSION_REV)
diff --git a/src/filters/transform/VSFilter/plugins.cpp b/src/filters/transform/VSFilter/plugins.cpp
index b42a46d67..c1d4ac0aa 100644
--- a/src/filters/transform/VSFilter/plugins.cpp
+++ b/src/filters/transform/VSFilter/plugins.cpp
@@ -1,6 +1,6 @@
/*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2014, 2016 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -571,7 +571,7 @@ namespace Plugin
bool FssProc(VDXFilterActivation* fa, const VDXFilterFunctions* ff, char* buf, int buflen) {
CStringA fn(GetFileName());
fn.Replace("\\", "\\\\");
- _snprintf_s(buf, buflen, buflen, "Config(\"%s\")", fn);
+ _snprintf_s(buf, buflen, buflen, "Config(\"%s\")", fn.GetString());
return true;
}
};
@@ -610,7 +610,7 @@ namespace Plugin
void StringProc(const VDXFilterActivation* fa, const VDXFilterFunctions* ff, char* str) {
if (!GetFileName().IsEmpty()) {
- sprintf_s(str, STRING_PROC_BUFFER_SIZE, " (%s, %d)", CStringA(GetFileName()), GetCharSet());
+ sprintf_s(str, STRING_PROC_BUFFER_SIZE, " (%s, %d)", CStringA(GetFileName()).GetString(), GetCharSet());
} else {
sprintf_s(str, STRING_PROC_BUFFER_SIZE, " (empty)");
}
@@ -619,7 +619,7 @@ namespace Plugin
bool FssProc(VDXFilterActivation* fa, const VDXFilterFunctions* ff, char* buf, int buflen) {
CStringA fn(GetFileName());
fn.Replace("\\", "\\\\");
- _snprintf_s(buf, buflen, buflen, "Config(\"%s\", %d)", fn, GetCharSet());
+ _snprintf_s(buf, buflen, buflen, "Config(\"%s\", %d)", fn.GetString(), GetCharSet());
return true;
}
};
@@ -1068,7 +1068,7 @@ UINT_PTR CALLBACK OpenHookProc(HWND hDlg, UINT uiMsg, WPARAM wParam, LPARAM lPar
for (ptrdiff_t i = 0; i < CharSetLen; i++) {
CString s;
- s.Format(_T("%s (%d)"), CharSetNames[i], CharSetList[i]);
+ s.Format(_T("%s (%u)"), CharSetNames[i], CharSetList[i]);
SendMessage(GetDlgItem(hDlg, IDC_COMBO1), CB_ADDSTRING, 0, (LPARAM)(LPCTSTR)s);
if (CharSetList[i] == (int)((OPENFILENAME*)lParam)->lCustData) {
SendMessage(GetDlgItem(hDlg, IDC_COMBO1), CB_SETCURSEL, i, 0);