diff options
author | kasper93 <kasper93@gmail.com> | 2013-09-13 16:48:51 +0400 |
---|---|---|
committer | kasper93 <kasper93@gmail.com> | 2013-10-20 17:44:11 +0400 |
commit | a4a2ea678a0c66b0b21dab4ee3d30ad98da701bd (patch) | |
tree | f4733336aeebac17b5b395e91cfc624670cb29c2 /src/filters | |
parent | b8e82fb73dcfc3aa10a0a166e89021735ef0d9a6 (diff) |
Fix uninitialized class members
Fixes CID #366317, #366318, #366360, #966281, #966282, #966283, #966284,
#966285, #966286, #966287, #966310, #966311, #966313, #966314, #966316,
#966328, #966329, #966343, #966345, #966346, #966347, #966349, #966350,
#966354, #966358, #966359, #966361, #966362, #966363, #966364, #966365,
#966366, #966370, #966371, #966373, #966374, #966375, #966376, #966377,
#966378, #1026047, #1027114, #1041190
Diffstat (limited to 'src/filters')
19 files changed, 126 insertions, 27 deletions
diff --git a/src/filters/muxer/BaseMuxer/BaseMuxerInputPin.cpp b/src/filters/muxer/BaseMuxer/BaseMuxerInputPin.cpp index 3a85851d7..e8c76a82b 100644 --- a/src/filters/muxer/BaseMuxer/BaseMuxerInputPin.cpp +++ b/src/filters/muxer/BaseMuxer/BaseMuxerInputPin.cpp @@ -38,6 +38,7 @@ CBaseMuxerInputPin::CBaseMuxerInputPin(LPCWSTR pName, CBaseFilter* pFilter, CCri , m_evAcceptPacket(TRUE)
, m_iPacketIndex(0)
, m_fEOS(false)
+ , m_rtMaxStart(_I64_MIN)
{
static int s_iID = 0;
m_iID = s_iID++;
diff --git a/src/filters/muxer/BaseMuxer/BitStream.cpp b/src/filters/muxer/BaseMuxer/BitStream.cpp index e4197cf39..f1e6b8a04 100644 --- a/src/filters/muxer/BaseMuxer/BitStream.cpp +++ b/src/filters/muxer/BaseMuxer/BitStream.cpp @@ -31,6 +31,7 @@ CBitStream::CBitStream(IStream* pStream, bool fThrowError) , m_pStream(pStream)
, m_fThrowError(fThrowError)
, m_bitlen(0)
+ , m_bitbuff(0)
{
ASSERT(m_pStream);
diff --git a/src/filters/muxer/DSMMuxer/DSMMuxer.cpp b/src/filters/muxer/DSMMuxer/DSMMuxer.cpp index 1edf06dcd..ea537a582 100644 --- a/src/filters/muxer/DSMMuxer/DSMMuxer.cpp +++ b/src/filters/muxer/DSMMuxer/DSMMuxer.cpp @@ -89,6 +89,7 @@ CDSMMuxerFilter::CDSMMuxerFilter(LPUNKNOWN pUnk, HRESULT* phr, bool fAutoChap, b : CBaseMuxerFilter(pUnk, phr, __uuidof(this))
, m_fAutoChap(fAutoChap)
, m_fAutoRes(fAutoRes)
+ , m_rtPrevSyncPoint(_I64_MIN)
{
if (phr) {
*phr = S_OK;
diff --git a/src/filters/muxer/MatroskaMuxer/MatroskaFile.cpp b/src/filters/muxer/MatroskaMuxer/MatroskaFile.cpp index 0f3ab862b..80e43b83f 100644 --- a/src/filters/muxer/MatroskaMuxer/MatroskaFile.cpp +++ b/src/filters/muxer/MatroskaMuxer/MatroskaFile.cpp @@ -664,6 +664,7 @@ HRESULT BlockGroup::Write(IStream* pStream) CBlock::CBlock(DWORD id)
: CID(id)
, TimeCode(0)
+ , TimeCodeStop(0)
{
}
diff --git a/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp b/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp index f6698ebf6..1ec4c431c 100644 --- a/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp +++ b/src/filters/muxer/MatroskaMuxer/MatroskaMuxer.cpp @@ -713,6 +713,8 @@ CMatroskaMuxerInputPin::CMatroskaMuxerInputPin(LPCWSTR pName, CBaseFilter* pFilt , m_fActive(false)
, m_fEndOfStreamReceived(false)
, m_rtDur(0)
+ , m_rtLastStart(0)
+ , m_rtLastStop(0)
{
}
diff --git a/src/filters/muxer/WavDest/WavDest.cpp b/src/filters/muxer/WavDest/WavDest.cpp index fb6a9ce9b..c059173f2 100644 --- a/src/filters/muxer/WavDest/WavDest.cpp +++ b/src/filters/muxer/WavDest/WavDest.cpp @@ -72,6 +72,8 @@ CFilterApp theApp; CWavDestFilter::CWavDestFilter(LPUNKNOWN pUnk, HRESULT* phr)
: CTransformFilter(NAME("WavDest filter"), pUnk, __uuidof(this))
+ , m_cbHeader(0)
+ , m_cbWavData(0)
{
if (SUCCEEDED(*phr)) {
if (CWavDestOutputPin* pOut = DEBUG_NEW CWavDestOutputPin(this, phr)) {
diff --git a/src/filters/parser/BaseSplitter/BaseSplitter.h b/src/filters/parser/BaseSplitter/BaseSplitter.h index b6aa1c251..a969e4f07 100644 --- a/src/filters/parser/BaseSplitter/BaseSplitter.h +++ b/src/filters/parser/BaseSplitter/BaseSplitter.h @@ -108,9 +108,12 @@ public: static const REFERENCE_TIME INVALID_TIME = _I64_MIN;
REFERENCE_TIME rtStart, rtStop;
AM_MEDIA_TYPE* pmt;
- Packet() {
- pmt = nullptr;
- bDiscontinuity = bAppendable = FALSE;
+ Packet()
+ : pmt(nullptr)
+ , bDiscontinuity(FALSE)
+ , bAppendable(FALSE)
+ , bSyncPoint(FALSE)
+ , TrackNumber(0) {
}
virtual ~Packet() {
if (pmt) {
diff --git a/src/filters/parser/BaseSplitter/BaseSplitterFileEx.h b/src/filters/parser/BaseSplitter/BaseSplitterFileEx.h index 3b4753ebb..d6939319a 100644 --- a/src/filters/parser/BaseSplitter/BaseSplitterFileEx.h +++ b/src/filters/parser/BaseSplitter/BaseSplitterFileEx.h @@ -379,11 +379,14 @@ public: , crop_left(0)
, crop_right(0)
, crop_top(0)
- , crop_bottom(0) {
+ , crop_bottom(0)
+ , lastid(0)
+ , views(1)
+ , AvgTimePerFrame(0)
+ , profile(0)
+ , level(0) {
ZeroMemory(spspps, sizeof(spspps));
- lastid = 0;
- views = 1;
- AvgTimePerFrame = 0;
+ ZeroMemory(&sar, sizeof(sar));
}
};
diff --git a/src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.cpp b/src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.cpp index 344923586..d9f8732ea 100644 --- a/src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.cpp +++ b/src/filters/renderer/MpcAudioRenderer/MpcAudioRenderer.cpp @@ -112,6 +112,8 @@ CMpcAudioRenderer::CMpcAudioRenderer(LPUNKNOWN punk, HRESULT* phr) , lastBufferTime(0)
, hnsActualDuration(0)
, m_lVolume(DSBVOLUME_MIN)
+ , pfAvSetMmThreadCharacteristicsW(nullptr)
+ , pfAvRevertMmThreadCharacteristics(nullptr)
{
#ifdef STANDALONE_FILTER
CRegKey key;
diff --git a/src/filters/renderer/SyncClock/SyncClock.cpp b/src/filters/renderer/SyncClock/SyncClock.cpp index 5b2a6a0d9..ff4406f32 100644 --- a/src/filters/renderer/SyncClock/SyncClock.cpp +++ b/src/filters/renderer/SyncClock/SyncClock.cpp @@ -84,12 +84,13 @@ CSyncClock::CSyncClock(LPUNKNOWN pUnk, HRESULT* phr) : CBaseReferenceClock(NAME("SyncClock"), pUnk, phr)
, m_pCurrentRefClock(0)
, m_pPrevRefClock(0)
+ , m_rtPrivateTime(GetTicks100ns())
+ , m_rtPrevTime(m_rtPrivateTime)
+ , adjustment(1.0)
+ , bias(1.0)
+ , m_llPerfFrequency(0)
{
QueryPerformanceFrequency((LARGE_INTEGER*)&m_llPerfFrequency);
- m_rtPrivateTime = GetTicks100ns();
- m_rtPrevTime = m_rtPrivateTime;
- adjustment = 1.0;
- bias = 1.0;
}
REFERENCE_TIME CSyncClock::GetPrivateTime()
diff --git a/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp index 0f9fd0a55..263c82d8d 100644 --- a/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp +++ b/src/filters/renderer/VideoRenderers/DX9AllocatorPresenter.cpp @@ -67,6 +67,32 @@ CDX9AllocatorPresenter::CDX9AllocatorPresenter(HWND hWnd, bool bFullscreen, HRES , m_Decoder(_T(""))
, m_nFrameType(PICT_NONE)
, m_FocusThread(nullptr)
+ , m_VBlankWaitTime(0)
+ , m_VBlankLockTime(0)
+ , m_VBlankMin(300000)
+ , m_VBlankMinCalc(300000)
+ , m_VBlankMax(0)
+ , m_VBlankEndPresent(-100000)
+ , m_VBlankStartMeasureTime(0)
+ , m_VBlankStartMeasure(0)
+ , m_PresentWaitTime(0)
+ , m_PresentWaitTimeMin(3000000000)
+ , m_PresentWaitTimeMax(0)
+ , m_PaintTime(0)
+ , m_PaintTimeMin(3000000000)
+ , m_PaintTimeMax(0)
+ , m_WaitForGPUTime(0)
+ , m_RasterStatusWaitTime(0)
+ , m_RasterStatusWaitTimeMin(3000000000)
+ , m_RasterStatusWaitTimeMax(0)
+ , m_RasterStatusWaitTimeMaxCalc(0)
+ , m_ClockDiffCalc(0.0)
+ , m_ClockDiffPrim(0.0)
+ , m_ClockDiff(0.0)
+ , m_ClockTimeChangeHistoryPos(0)
+ , m_ModeratedTimeSpeed(1.0)
+ , m_ModeratedTimeSpeedPrim(0.0)
+ , m_ModeratedTimeSpeedDiff(0.0)
{
if (FAILED(hr)) {
_Error += _T("ISubPicAllocatorPresenterImpl failed\n");
diff --git a/src/filters/renderer/VideoRenderers/DX9RenderingEngine.cpp b/src/filters/renderer/VideoRenderers/DX9RenderingEngine.cpp index 10a39e77e..30337df22 100644 --- a/src/filters/renderer/VideoRenderers/DX9RenderingEngine.cpp +++ b/src/filters/renderer/VideoRenderers/DX9RenderingEngine.cpp @@ -148,7 +148,29 @@ CDX9RenderingEngine::CDX9RenderingEngine(HWND hWnd, HRESULT& hr, CString* _pErro , m_nNbDXSurface(1)
, m_nCurSurface(0)
, m_CurrentAdapter(0)
+ , m_BackbufferType(D3DFMT_UNKNOWN)
+ , m_DisplayType(D3DFMT_UNKNOWN)
+ , m_bHighColorResolution(false)
+ , m_bForceInputHighColorResolution(false)
+ , m_RenderingPath(RENDERING_PATH_DRAW)
+ , m_SurfaceType(D3DFMT_UNKNOWN)
+ , m_bFullFloatingPointProcessing(false)
+ , m_bHalfFloatingPointProcessing(false)
+ , m_bColorManagement(false)
+ , m_InputVideoSystem(VIDEO_SYSTEM_UNKNOWN)
+ , m_AmbientLight(AMBIENT_LIGHT_BRIGHT)
+ , m_RenderingIntent(COLOR_RENDERING_INTENT_PERCEPTUAL)
+ , m_ScreenSpacePassCount(1)
+ , m_ScreenSpacePassSrc(0)
+ , m_ScreenSpacePassDest(1)
+ , m_pRenderTarget(nullptr)
+ , m_BicubicA(0)
+ , m_bFinalPass(false)
+ , m_Lut3DSize(64)
+ , m_Lut3DEntryCount(64 * 64 * 64)
+ , m_StretchRectFilter(D3DTEXF_NONE)
{
+ ZeroMemory(&m_Caps, sizeof(m_Caps));
HINSTANCE hDll = GetRenderersData()->GetD3X9Dll();
m_bD3DX = hDll != nullptr;
diff --git a/src/filters/renderer/VideoRenderers/RM7AllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/RM7AllocatorPresenter.cpp index 9438214a5..7e12ecbb0 100644 --- a/src/filters/renderer/VideoRenderers/RM7AllocatorPresenter.cpp +++ b/src/filters/renderer/VideoRenderers/RM7AllocatorPresenter.cpp @@ -31,6 +31,8 @@ using namespace DSObjects; CRM7AllocatorPresenter::CRM7AllocatorPresenter(HWND hWnd, HRESULT& hr)
: CDX7AllocatorPresenter(hWnd, hr)
{
+ ZeroMemory(&m_bitmapInfo, sizeof(m_bitmapInfo));
+ ZeroMemory(&m_lastBitmapInfo, sizeof(m_lastBitmapInfo));
}
STDMETHODIMP CRM7AllocatorPresenter::NonDelegatingQueryInterface(REFIID riid, void** ppv)
diff --git a/src/filters/renderer/VideoRenderers/RM9AllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/RM9AllocatorPresenter.cpp index b063cb1b3..b847fe0a1 100644 --- a/src/filters/renderer/VideoRenderers/RM9AllocatorPresenter.cpp +++ b/src/filters/renderer/VideoRenderers/RM9AllocatorPresenter.cpp @@ -30,6 +30,8 @@ using namespace DSObjects; CRM9AllocatorPresenter::CRM9AllocatorPresenter(HWND hWnd, bool bFullscreen, HRESULT& hr, CString& _Error)
: CDX9AllocatorPresenter(hWnd, bFullscreen, hr, false, _Error)
{
+ ZeroMemory(&m_bitmapInfo, sizeof(m_bitmapInfo));
+ ZeroMemory(&m_lastBitmapInfo, sizeof(m_lastBitmapInfo));
}
STDMETHODIMP CRM9AllocatorPresenter::NonDelegatingQueryInterface(REFIID riid, void** ppv)
diff --git a/src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.cpp b/src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.cpp index 9b9823fde..741f9b35a 100644 --- a/src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.cpp +++ b/src/filters/renderer/VideoRenderers/madVRAllocatorPresenter.cpp @@ -52,6 +52,7 @@ public IUnknown { CmadVRAllocatorPresenter::CmadVRAllocatorPresenter(HWND hWnd, HRESULT& hr, CString& _Error)
: CSubPicAllocatorPresenterImpl(hWnd, hr, &_Error)
, m_ScreenSize(0, 0)
+ , m_bIsFullscreen(false)
{
if (FAILED(hr)) {
_Error += L"ISubPicAllocatorPresenterImpl failed\n";
diff --git a/src/filters/switcher/AudioSwitcher/Audio.cpp b/src/filters/switcher/AudioSwitcher/Audio.cpp index 0cf6ef7e5..51a0978b6 100644 --- a/src/filters/switcher/AudioSwitcher/Audio.cpp +++ b/src/filters/switcher/AudioSwitcher/Audio.cpp @@ -177,11 +177,15 @@ static void make_downsample_filter(long* filter_bank, int filter_width, long sam }
AudioStreamResampler::AudioStreamResampler(int bps, long orig_rate, long new_rate, bool fHighQuality)
+ : samp_frac(0x80000)
+ , bps(bps)
+ , holdover(0)
+ , filter_bank(nullptr)
+ , filter_width(1)
+ , accum(0)
+ , ptsampleRout(audio_pointsample_16)
+ , dnsampleRout(audio_downsample_mono16)
{
- samp_frac = 0x80000;
-
- this->bps = bps;
-
if (bps == 1) {
ptsampleRout = audio_pointsample_8;
dnsampleRout = audio_downsample_mono8;
@@ -195,13 +199,7 @@ AudioStreamResampler::AudioStreamResampler(int bps, long orig_rate, long new_rat // orig_rate > new_rate!
samp_frac = MulDiv(orig_rate, 0x80000, new_rate);
- holdover = 0;
- filter_bank = nullptr;
- filter_width = 1;
- accum = 0;
-
// If this is a high-quality downsample, allocate memory for the filter bank
-
if (fHighQuality) {
if (samp_frac > 0x80000) {
// HQ downsample: allocate filter bank
diff --git a/src/filters/switcher/AudioSwitcher/StreamSwitcher.cpp b/src/filters/switcher/AudioSwitcher/StreamSwitcher.cpp index 71e7cae7a..a1321072b 100644 --- a/src/filters/switcher/AudioSwitcher/StreamSwitcher.cpp +++ b/src/filters/switcher/AudioSwitcher/StreamSwitcher.cpp @@ -1164,6 +1164,8 @@ STDMETHODIMP CStreamSwitcherOutputPin::Backout(IPin* ppinOut, IGraphBuilder* pGr CStreamSwitcherFilter::CStreamSwitcherFilter(LPUNKNOWN lpunk, HRESULT* phr, const CLSID& clsid)
: CBaseFilter(NAME("CStreamSwitcherFilter"), lpunk, &m_csState, clsid)
+ , m_pInput(nullptr)
+ , m_pOutput(nullptr)
{
if (phr) {
*phr = S_OK;
diff --git a/src/filters/transform/VSFilter/DirectVobSubPropPage.cpp b/src/filters/transform/VSFilter/DirectVobSubPropPage.cpp index e7247cbee..b82e5511c 100644 --- a/src/filters/transform/VSFilter/DirectVobSubPropPage.cpp +++ b/src/filters/transform/VSFilter/DirectVobSubPropPage.cpp @@ -295,6 +295,12 @@ CDVSMainPPage::CDVSMainPPage(LPUNKNOWN pUnk, HRESULT* phr) : CDVSBasePPage(NAME("VSFilter Property Page (main)"), pUnk, IDD_DVSMAINPAGE, IDD_DVSMAINPAGE)
, m_nLangs(0)
, m_ppLangs(nullptr)
+ , m_iSelectedLanguage(0)
+ , m_fOverridePlacement(false)
+ , m_PlacementXperc(50)
+ , m_PlacementYperc(90)
+ , m_fOnlyShowForcedVobSubs(false)
+ , m_fn()
{
BindControl(IDC_FILENAME, m_fnedit);
BindControl(IDC_LANGCOMBO, m_langs);
@@ -473,8 +479,17 @@ void CDVSMainPPage::UpdateControlData(bool fSave) /* CDVSGeneralPPage */
-CDVSGeneralPPage::CDVSGeneralPPage(LPUNKNOWN pUnk, HRESULT* phr) :
- CDVSBasePPage(NAME("VSFilter Property Page (global settings)"), pUnk, IDD_DVSGENERALPAGE, IDD_DVSGENERALPAGE)
+CDVSGeneralPPage::CDVSGeneralPPage(LPUNKNOWN pUnk, HRESULT* phr)
+ : CDVSBasePPage(NAME("VSFilter Property Page (global settings)"), pUnk, IDD_DVSGENERALPAGE, IDD_DVSGENERALPAGE)
+ , m_HorExt(0)
+ , m_VerExt(0)
+ , m_ResX2(0)
+ , m_ResX2minw(0)
+ , m_ResX2minh(0)
+ , m_LoadLevel(0)
+ , m_fExternalLoad(true)
+ , m_fWebLoad(true)
+ , m_fEmbeddedLoad(true)
{
BindControl(IDC_VEREXTCOMBO, m_verext);
BindControl(IDC_MOD32FIX, m_mod32fix);
@@ -595,8 +610,16 @@ void CDVSGeneralPPage::UpdateControlData(bool fSave) /* CDVSMiscPPage */
-CDVSMiscPPage::CDVSMiscPPage(LPUNKNOWN pUnk, HRESULT* phr) :
- CDVSBasePPage(NAME("VSFilter Property Page (misc settings)"), pUnk, IDD_DVSMISCPAGE, IDD_DVSMISCPAGE)
+CDVSMiscPPage::CDVSMiscPPage(LPUNKNOWN pUnk, HRESULT* phr)
+ : CDVSBasePPage(NAME("VSFilter Property Page (misc settings)"), pUnk, IDD_DVSMISCPAGE, IDD_DVSMISCPAGE)
+ , m_fFlipPicture(false)
+ , m_fFlipSubtitles(false)
+ , m_fHideSubtitles(false)
+ , m_fOSD(false)
+ , m_fAnimWhenBuffering(true)
+ , m_fReloaderDisabled(false)
+ , m_fSaveFullPath(false)
+ , m_uSubPictToBuffer(10)
{
BindControl(IDC_FLIP, m_flippic);
BindControl(IDC_FLIPSUB, m_flipsub);
@@ -678,8 +701,13 @@ void CDVSMiscPPage::UpdateControlData(bool fSave) /* CDVSTimingPPage */
-CDVSTimingPPage::CDVSTimingPPage(LPUNKNOWN pUnk, HRESULT* phr) :
- CDVSBasePPage(NAME("VSFilter Timing Property Page"), pUnk, IDD_DVSTIMINGPAGE, IDD_DVSTIMINGPAGE)
+CDVSTimingPPage::CDVSTimingPPage(LPUNKNOWN pUnk, HRESULT* phr)
+ : CDVSBasePPage(NAME("VSFilter Timing Property Page"), pUnk, IDD_DVSTIMINGPAGE, IDD_DVSTIMINGPAGE)
+ , m_SubtitleSpeedMul(1000)
+ , m_SubtitleSpeedDiv(1000)
+ , m_SubtitleDelay(0)
+ , m_fMediaFPSEnabled(false)
+ , m_MediaFPS(25.0)
{
BindControl(IDC_MODFPS, m_modfps);
BindControl(IDC_FPS, m_fps);
diff --git a/src/filters/transform/VSFilter/StyleEditorDialog.cpp b/src/filters/transform/VSFilter/StyleEditorDialog.cpp index a686c2b93..1e8f8c524 100644 --- a/src/filters/transform/VSFilter/StyleEditorDialog.cpp +++ b/src/filters/transform/VSFilter/StyleEditorDialog.cpp @@ -52,6 +52,7 @@ CStyleEditorDialog::CStyleEditorDialog(CString title, STSStyle* pstss, CWnd* pPa , m_screenalignment(0)
, m_margin(0, 0, 0, 0)
, m_linkalphasliders(FALSE)
+ , m_alpha()
{
}
|