diff options
| author | Joel Corley <[email protected]> | 2020-04-07 00:43:16 -0700 |
|---|---|---|
| committer | Joel Corley <[email protected]> | 2020-04-07 00:43:16 -0700 |
| commit | 27c8560ba860165db5a173b37591271397d20bb7 (patch) | |
| tree | 5eb91440b4fcd8d199a162c053f171a925b8eced /avstream/avssamp | |
| parent | 6568238719a3fe6d317e1d4a13131f5d2ca0234b (diff) | |
| parent | 60dab78e2549a164e5558b2169a900f24ac41434 (diff) | |
Merge branch 'UpdateVibraniumAvstream' of https://github.com/JoelCorley/Windows-driver-samples into UpdateVibraniumAvstream
Diffstat (limited to 'avstream/avssamp')
| -rw-r--r-- | avstream/avssamp/Filter.cpp | 6 | ||||
| -rw-r--r-- | avstream/avssamp/avssamp.cpp | 16 | ||||
| -rw-r--r-- | avstream/avssamp/video.cpp | 4 | ||||
| -rw-r--r-- | avstream/avssamp/wave.cpp | 2 |
4 files changed, 8 insertions, 20 deletions
diff --git a/avstream/avssamp/Filter.cpp b/avstream/avssamp/Filter.cpp index 524d6ad8..b3b70c30 100644 --- a/avstream/avssamp/Filter.cpp +++ b/avstream/avssamp/Filter.cpp @@ -268,17 +268,17 @@ Return Value: // PKSDATARANGE_AUDIO DataRangeAudio = reinterpret_cast <PKSDATARANGE_AUDIO> ( - ExAllocatePoolWithTag (PagedPool, sizeof (KSDATARANGE_AUDIO), AVSSMP_POOLTAG) + ExAllocatePoolZero (PagedPool, sizeof (KSDATARANGE_AUDIO), AVSSMP_POOLTAG) ); PKSDATARANGE_AUDIO *DataRanges = reinterpret_cast <PKSDATARANGE_AUDIO *> ( - ExAllocatePoolWithTag (PagedPool, sizeof (PKSDATARANGE_AUDIO), AVSSMP_POOLTAG) + ExAllocatePoolZero (PagedPool, sizeof (PKSDATARANGE_AUDIO), AVSSMP_POOLTAG) ); PKSALLOCATOR_FRAMING_EX Framing = reinterpret_cast <PKSALLOCATOR_FRAMING_EX> ( - ExAllocatePoolWithTag (PagedPool, sizeof (KSALLOCATOR_FRAMING_EX), AVSSMP_POOLTAG) + ExAllocatePoolZero (PagedPool, sizeof (KSALLOCATOR_FRAMING_EX), AVSSMP_POOLTAG) ); if (DataRangeAudio && DataRanges && Framing) { diff --git a/avstream/avssamp/avssamp.cpp b/avstream/avssamp/avssamp.cpp index 68741c9e..1ba03089 100644 --- a/avstream/avssamp/avssamp.cpp +++ b/avstream/avssamp/avssamp.cpp @@ -38,13 +38,7 @@ PVOID operator new POOL_TYPE poolType ) { - PVOID result = ExAllocatePoolWithTag(poolType,iSize,'wNCK'); - - if (result) { - RtlZeroMemory(result,iSize); - } - - return result; + return ExAllocatePoolZero(poolType,iSize,'wNCK'); } PVOID operator new @@ -57,13 +51,7 @@ PVOID operator new ULONG tag ) { - PVOID result = ExAllocatePoolWithTag(poolType,iSize,tag); - - if (result) { - RtlZeroMemory(result,iSize); - } - - return result; + return ExAllocatePoolZero(poolType,iSize,tag); } /*++ diff --git a/avstream/avssamp/video.cpp b/avstream/avssamp/video.cpp index d18dc95d..1be9b56e 100644 --- a/avstream/avssamp/video.cpp +++ b/avstream/avssamp/video.cpp @@ -210,7 +210,7 @@ Return Value: VideoInfoHeader); m_VideoInfoHeader = reinterpret_cast <PKS_VIDEOINFOHEADER> ( - ExAllocatePoolWithTag ( + ExAllocatePoolZero ( NonPagedPool, KS_SIZE_VIDEOHEADER (ConnectionHeader), AVSSMP_POOLTAG @@ -864,7 +864,7 @@ Return Value: if (FromState == KSSTATE_STOP) { m_SynthesisBuffer = reinterpret_cast <PUCHAR> ( - ExAllocatePoolWithTag ( + ExAllocatePoolZero ( NonPagedPool, m_VideoInfoHeader -> bmiHeader.biSizeImage, AVSSMP_POOLTAG diff --git a/avstream/avssamp/wave.cpp b/avstream/avssamp/wave.cpp index 7af2f60a..de110e69 100644 --- a/avstream/avssamp/wave.cpp +++ b/avstream/avssamp/wave.cpp @@ -319,7 +319,7 @@ Return Value: // if (NT_SUCCESS (Status)) { m_WaveData = reinterpret_cast <PUCHAR> ( - ExAllocatePoolWithTag (NonPagedPool, DataBlockSize, AVSSMP_POOLTAG) + ExAllocatePoolZero (NonPagedPool, DataBlockSize, AVSSMP_POOLTAG) ); if (!m_WaveData) { |
