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:
authorUnderground78 <underground78@users.sourceforge.net>2012-05-19 20:17:33 +0400
committerUnderground78 <underground78@users.sourceforge.net>2012-05-19 20:17:33 +0400
commit62027be3b2b59998a50b50d7be184676f2a90f15 (patch)
tree16ec7654489faaacf8a5a38934f3e1abcf4b172e /src/filters/parser/MP4Splitter/MP4Splitter.cpp
parent0aeeed3651f2c235b64b0cdbd3e5a27143208d11 (diff)
Use Microsoft's _countof macro when it exists since its C++ implementation is safer than just doing sizeof(array)/sizeof(array[0])
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@4801 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/parser/MP4Splitter/MP4Splitter.cpp')
-rw-r--r--src/filters/parser/MP4Splitter/MP4Splitter.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/filters/parser/MP4Splitter/MP4Splitter.cpp b/src/filters/parser/MP4Splitter/MP4Splitter.cpp
index 6ec533610..9604f3572 100644
--- a/src/filters/parser/MP4Splitter/MP4Splitter.cpp
+++ b/src/filters/parser/MP4Splitter/MP4Splitter.cpp
@@ -51,14 +51,14 @@ const AMOVIESETUP_MEDIATYPE sudPinTypesIn[] = {
};
const AMOVIESETUP_PIN sudpPins[] = {
- {L"Input", FALSE, FALSE, FALSE, FALSE, &CLSID_NULL, NULL, countof(sudPinTypesIn), sudPinTypesIn},
+ {L"Input", FALSE, FALSE, FALSE, FALSE, &CLSID_NULL, NULL, _countof(sudPinTypesIn), sudPinTypesIn},
{L"Output", FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, NULL, 0, NULL}
};
const AMOVIESETUP_FILTER sudFilter[] = {
- {&__uuidof(CMP4SplitterFilter), MP4SplitterName, MERIT_NORMAL, countof(sudpPins), sudpPins, CLSID_LegacyAmFilterCategory},
+ {&__uuidof(CMP4SplitterFilter), MP4SplitterName, MERIT_NORMAL, _countof(sudpPins), sudpPins, CLSID_LegacyAmFilterCategory},
{&__uuidof(CMP4SourceFilter), MP4SourceName, MERIT_NORMAL, 0, NULL, CLSID_LegacyAmFilterCategory},
- {&__uuidof(CMPEG4VideoSplitterFilter), L"MPC MPEG4 Video Splitter", MERIT_NORMAL, countof(sudpPins), sudpPins, CLSID_LegacyAmFilterCategory},
+ {&__uuidof(CMPEG4VideoSplitterFilter), L"MPC MPEG4 Video Splitter", MERIT_NORMAL, _countof(sudpPins), sudpPins, CLSID_LegacyAmFilterCategory},
{&__uuidof(CMPEG4VideoSourceFilter), L"MPC MPEG4 Video Source", MERIT_NORMAL, 0, NULL, CLSID_LegacyAmFilterCategory},
};
@@ -69,7 +69,7 @@ CFactoryTemplate g_Templates[] = {
{sudFilter[3].strName, sudFilter[3].clsID, CreateInstance<CMPEG4VideoSourceFilter>, NULL, &sudFilter[3]},
};
-int g_cTemplates = countof(g_Templates);
+int g_cTemplates = _countof(g_Templates);
STDAPI DllRegisterServer()
{
@@ -770,8 +770,8 @@ HRESULT CMP4SplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader)
SUBTITLEINFO* si = (SUBTITLEINFO*)mt.AllocFormatBuffer(sizeof(SUBTITLEINFO) + hdr.GetLength());
memset(si, 0, mt.FormatLength());
si->dwOffset = sizeof(SUBTITLEINFO);
- strcpy_s(si->IsoLang, countof(si->IsoLang), CStringA(TrackLanguage));
- wcscpy_s(si->TrackName, countof(si->TrackName), TrackName);
+ strcpy_s(si->IsoLang, _countof(si->IsoLang), CStringA(TrackLanguage));
+ wcscpy_s(si->TrackName, _countof(si->TrackName), TrackName);
memcpy(si + 1, (LPCSTR)hdr, hdr.GetLength());
mts.Add(mt);
}
@@ -805,8 +805,8 @@ HRESULT CMP4SplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader)
SUBTITLEINFO* si = (SUBTITLEINFO*)mt.AllocFormatBuffer(sizeof(SUBTITLEINFO) + hdr.GetLength());
memset(si, 0, mt.FormatLength());
si->dwOffset = sizeof(SUBTITLEINFO);
- strcpy_s(si->IsoLang, countof(si->IsoLang), CStringA(TrackLanguage));
- wcscpy_s(si->TrackName, countof(si->TrackName), TrackName);
+ strcpy_s(si->IsoLang, _countof(si->IsoLang), CStringA(TrackLanguage));
+ wcscpy_s(si->TrackName, _countof(si->TrackName), TrackName);
memcpy(si + 1, (LPCSTR)hdr, hdr.GetLength());
mts.Add(mt);
}