diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2017-08-11 22:17:22 +0300 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2017-08-11 22:17:22 +0300 |
commit | 5e8b059d71613afcc08c90887ab41f3b4aa744e2 (patch) | |
tree | 6380fd6d98e787993695e2d4eebbf293ac6a5071 | |
parent | 78754d884da1794af339254245b7d79dcf33ea94 (diff) |
Remove pre-Vista compat code
-rw-r--r-- | common/DSUtilLite/DShowUtil.cpp | 11 | ||||
-rw-r--r-- | common/DSUtilLite/DShowUtil.h | 1 | ||||
-rw-r--r-- | decoder/LAVAudio/LAVAudio.cpp | 3 | ||||
-rw-r--r-- | decoder/LAVVideo/decoders/cuvid.cpp | 2 |
4 files changed, 1 insertions, 16 deletions
diff --git a/common/DSUtilLite/DShowUtil.cpp b/common/DSUtilLite/DShowUtil.cpp index 6381b8d8..e5bc10ef 100644 --- a/common/DSUtilLite/DShowUtil.cpp +++ b/common/DSUtilLite/DShowUtil.cpp @@ -720,17 +720,6 @@ void CopyMediaSideDataFF(AVPacket *dst, const MediaSideDataFFMpeg **sd) *sd = nullptr; } -BOOL IsVistaOrNewer() -{ - // Query OS version info - OSVERSIONINFO os; - ZeroMemory(&os, sizeof(os)); - os.dwOSVersionInfoSize = sizeof(os); - GetVersionEx(&os); - - return (os.dwMajorVersion >= 6); -} - BOOL IsWindows7OrNewer() { // Query OS version info diff --git a/common/DSUtilLite/DShowUtil.h b/common/DSUtilLite/DShowUtil.h index 2a01c9c8..aaf444fe 100644 --- a/common/DSUtilLite/DShowUtil.h +++ b/common/DSUtilLite/DShowUtil.h @@ -136,7 +136,6 @@ struct AVPacket; struct MediaSideDataFFMpeg; void CopyMediaSideDataFF(AVPacket *dst, const MediaSideDataFFMpeg **sd); -BOOL IsVistaOrNewer(); BOOL IsWindows7OrNewer(); BOOL IsWindows8OrNewer(); BOOL IsWindows10OrNewer(); diff --git a/decoder/LAVAudio/LAVAudio.cpp b/decoder/LAVAudio/LAVAudio.cpp index 1dee785c..fc603348 100644 --- a/decoder/LAVAudio/LAVAudio.cpp +++ b/decoder/LAVAudio/LAVAudio.cpp @@ -181,9 +181,6 @@ HRESULT CLAVAudio::LoadDefaults() m_settings.bSampleFormats[i] = TRUE; m_settings.SampleConvertDither = TRUE; - if (!IsVistaOrNewer()) - m_settings.bSampleFormats[SampleFormat_FP32] = FALSE; - m_settings.AudioDelayEnabled = FALSE; m_settings.AudioDelay = 0; diff --git a/decoder/LAVVideo/decoders/cuvid.cpp b/decoder/LAVVideo/decoders/cuvid.cpp index a76bf000..66107261 100644 --- a/decoder/LAVVideo/decoders/cuvid.cpp +++ b/decoder/LAVVideo/decoders/cuvid.cpp @@ -736,7 +736,7 @@ STDMETHODIMP CDecCuvid::CreateCUVIDDecoder(cudaVideoCodec codec, DWORD dwWidth, { DbgLog((LOG_TRACE, 10, L"CDecCuvid::CreateCUVIDDecoder(): Creating CUVID decoder instance")); HRESULT hr = S_OK; - BOOL bDXVAMode = (m_pD3DDevice9 && IsVistaOrNewer()); + BOOL bDXVAMode = (m_pD3DDevice9 != nullptr); cuda.cuvidCtxLock(m_cudaCtxLock, 0); CUVIDDECODECREATEINFO *dci = &m_VideoDecoderInfo; |