diff options
author | Underground78 <underground78@users.sourceforge.net> | 2012-11-10 19:14:36 +0400 |
---|---|---|
committer | Underground78 <underground78@users.sourceforge.net> | 2012-11-12 02:24:55 +0400 |
commit | 19f3afdfa6586b556af5886f8eaf1f1390f06612 (patch) | |
tree | b8fcc77c0e57fb52e0d6b8f03c258992e29836d9 /src/filters/parser/BaseSplitter | |
parent | 5f99d807904e3adaa533b954df8bc37e28c7a4fe (diff) |
Properly enable memory leak detection.
Use MS define DEBUG_NEW.
Diffstat (limited to 'src/filters/parser/BaseSplitter')
-rw-r--r-- | src/filters/parser/BaseSplitter/BaseSplitter.cpp | 10 | ||||
-rw-r--r-- | src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp | 14 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/filters/parser/BaseSplitter/BaseSplitter.cpp b/src/filters/parser/BaseSplitter/BaseSplitter.cpp index 24b96cd44..e9ad126a8 100644 --- a/src/filters/parser/BaseSplitter/BaseSplitter.cpp +++ b/src/filters/parser/BaseSplitter/BaseSplitter.cpp @@ -239,7 +239,7 @@ HRESULT CBaseSplitterOutputPin::SetName(LPCWSTR pName) if (m_pName) {
delete [] m_pName;
}
- m_pName = DNew WCHAR[wcslen(pName) + 1];
+ m_pName = DEBUG_NEW WCHAR[wcslen(pName) + 1];
CheckPointer(m_pName, E_OUTOFMEMORY);
wcscpy_s(m_pName, wcslen(pName) + 1, pName);
return S_OK;
@@ -655,7 +655,7 @@ void CBaseSplitterOutputPin::MakeISCRHappy() CComPtr<IBaseFilter> pBF = GetFilterFromPin(pPinTo);
if (GetCLSID(pBF) == GUIDFromCString(_T("{48025243-2D39-11CE-875D-00608CB78066}"))) { // ISCR
- CAutoPtr<Packet> p(DNew Packet());
+ CAutoPtr<Packet> p(DEBUG_NEW Packet());
p->TrackNumber = (DWORD) - 1;
p->rtStart = -1;
p->rtStop = 0;
@@ -785,7 +785,7 @@ CBaseSplitterFilter::CBaseSplitterFilter(LPCTSTR pName, LPUNKNOWN pUnk, HRESULT* *phr = S_OK;
}
- m_pInput.Attach(DNew CBaseSplitterInputPin(NAME("CBaseSplitterInputPin"), this, this, phr));
+ m_pInput.Attach(DEBUG_NEW CBaseSplitterInputPin(NAME("CBaseSplitterInputPin"), this, this, phr));
}
CBaseSplitterFilter::~CBaseSplitterFilter()
@@ -1239,9 +1239,9 @@ STDMETHODIMP CBaseSplitterFilter::Load(LPCOLESTR pszFileName, const AM_MEDIA_TYP CAtlList<CHdmvClipInfo::PlaylistChapter> Chapters;
if (BuildPlaylist(pszFileName, Items)) {
- pAsyncReader = (IAsyncReader*)DNew CAsyncFileReader(Items, hr);
+ pAsyncReader = (IAsyncReader*)DEBUG_NEW CAsyncFileReader(Items, hr);
} else {
- pAsyncReader = (IAsyncReader*)DNew CAsyncFileReader(CString(pszFileName), hr);
+ pAsyncReader = (IAsyncReader*)DEBUG_NEW CAsyncFileReader(CString(pszFileName), hr);
}
if (FAILED(hr)
diff --git a/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp b/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp index fdb4bc984..4c7bc9ad7 100644 --- a/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp +++ b/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp @@ -414,7 +414,7 @@ bool CBaseSplitterFileEx::Read(seqhdr& h, int len, CMediaType* pmt) pmt->subtype = MEDIASUBTYPE_MPEG1Payload;
pmt->formattype = FORMAT_MPEGVideo;
int len = FIELD_OFFSET(MPEG1VIDEOINFO, bSequenceHeader) + int(shlen + shextlen);
- MPEG1VIDEOINFO* vi = (MPEG1VIDEOINFO*)DNew BYTE[len];
+ MPEG1VIDEOINFO* vi = (MPEG1VIDEOINFO*)DEBUG_NEW BYTE[len];
memset(vi, 0, len);
vi->hdr.dwBitRate = h.bitrate;
vi->hdr.AvgTimePerFrame = h.ifps;
@@ -436,7 +436,7 @@ bool CBaseSplitterFileEx::Read(seqhdr& h, int len, CMediaType* pmt) pmt->subtype = MEDIASUBTYPE_MPEG2_VIDEO;
pmt->formattype = FORMAT_MPEG2_VIDEO;
int len = FIELD_OFFSET(MPEG2VIDEOINFO, dwSequenceHeader) + int(shlen + shextlen);
- MPEG2VIDEOINFO* vi = (MPEG2VIDEOINFO*)DNew BYTE[len];
+ MPEG2VIDEOINFO* vi = (MPEG2VIDEOINFO*)DEBUG_NEW BYTE[len];
memset(vi, 0, len);
vi->hdr.dwBitRate = h.bitrate;
vi->hdr.AvgTimePerFrame = h.ifps;
@@ -549,7 +549,7 @@ bool CBaseSplitterFileEx::Read(mpahdr& h, int len, bool fAllowV25, CMediaType* p size_t size = h.layer == 3
? sizeof(WAVEFORMATEX/*MPEGLAYER3WAVEFORMAT*/) // no need to overcomplicate this...
: sizeof(MPEG1WAVEFORMAT);
- WAVEFORMATEX* wfe = (WAVEFORMATEX*)DNew BYTE[size];
+ WAVEFORMATEX* wfe = (WAVEFORMATEX*)DEBUG_NEW BYTE[size];
memset(wfe, 0, size);
wfe->cbSize = WORD(size - sizeof(WAVEFORMATEX));
@@ -624,7 +624,7 @@ bool CBaseSplitterFileEx::Read(latm_aachdr& h, int len, CMediaType* pmt) return true;
}
- WAVEFORMATEX* wfe = (WAVEFORMATEX*)DNew BYTE[sizeof(WAVEFORMATEX)];
+ WAVEFORMATEX* wfe = (WAVEFORMATEX*)DEBUG_NEW BYTE[sizeof(WAVEFORMATEX)];
memset(wfe, 0, sizeof(WAVEFORMATEX));
wfe->wFormatTag = WAVE_FORMAT_LATM_AAC;
wfe->nChannels = h.channels;
@@ -701,7 +701,7 @@ bool CBaseSplitterFileEx::Read(aachdr& h, int len, CMediaType* pmt, MPEG_TYPES m return true;
}
- WAVEFORMATEX* wfe = (WAVEFORMATEX*)DNew BYTE[sizeof(WAVEFORMATEX) + 5];
+ WAVEFORMATEX* wfe = (WAVEFORMATEX*)DEBUG_NEW BYTE[sizeof(WAVEFORMATEX) + 5];
memset(wfe, 0, sizeof(WAVEFORMATEX) + 5);
wfe->wFormatTag = WAVE_FORMAT_AAC;
wfe->nChannels = h.channels <= 6 ? h.channels : 2;
@@ -1697,7 +1697,7 @@ bool CBaseSplitterFileEx::Read(avchdr& h, int len, CMediaType* pmt) //pmt->subtype = MEDIASUBTYPE_H264; // TODO : put MEDIASUBTYPE_H264 to support Windows 7 decoder !
pmt->formattype = FORMAT_MPEG2_VIDEO;
int len = FIELD_OFFSET(MPEG2VIDEOINFO, dwSequenceHeader) + extra;
- MPEG2VIDEOINFO* vi = (MPEG2VIDEOINFO*)DNew BYTE[len];
+ MPEG2VIDEOINFO* vi = (MPEG2VIDEOINFO*)DEBUG_NEW BYTE[len];
memset(vi, 0, len);
// vi->hdr.dwBitRate = ;
vi->hdr.AvgTimePerFrame = h.AvgTimePerFrame;
@@ -2164,7 +2164,7 @@ bool CBaseSplitterFileEx::Read(vc1hdr& h, int len, CMediaType* pmt, int guid_fla }
pmt->formattype = FORMAT_VIDEOINFO2;
int vi_len = sizeof(VIDEOINFOHEADER2) + (int)extralen + 1;
- VIDEOINFOHEADER2* vi = (VIDEOINFOHEADER2*)DNew BYTE[vi_len];
+ VIDEOINFOHEADER2* vi = (VIDEOINFOHEADER2*)DEBUG_NEW BYTE[vi_len];
memset(vi, 0, vi_len);
vi->AvgTimePerFrame = (10000000I64 * nFrameRateNum) / nFrameRateDen;
|