summaryrefslogtreecommitdiff
path: root/avstream/avscamera/sys/Capture.cpp
diff options
context:
space:
mode:
authorAdonais Romero González <[email protected]>2020-04-07 16:17:44 -0700
committerGitHub <[email protected]>2020-04-07 16:17:44 -0700
commit13c61ceeb3f7da66a2b57730d12d14eb7463c46a (patch)
treeff52f9ac442a60625936a266db1bef12ac694a8e /avstream/avscamera/sys/Capture.cpp
parentdd4fad494b996f5729be98e0271ea74ef1a5d2ad (diff)
parent27c8560ba860165db5a173b37591271397d20bb7 (diff)
Update all the AvStream samples for Vibranium136198136197136196136195136194
Update all the AvStream samples for Vibranium.
Diffstat (limited to 'avstream/avscamera/sys/Capture.cpp')
-rw-r--r--avstream/avscamera/sys/Capture.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/avstream/avscamera/sys/Capture.cpp b/avstream/avscamera/sys/Capture.cpp
index e5d43ddd..25e6a5f8 100644
--- a/avstream/avscamera/sys/Capture.cpp
+++ b/avstream/avscamera/sys/Capture.cpp
@@ -266,7 +266,7 @@ Return Value:
(m_Pin->ConnectionFormat))->ImageInfoHeader);
m_VideoInfoHeader = reinterpret_cast <PKS_VIDEOINFOHEADER> (
- ExAllocatePoolWithTag (
+ ExAllocatePoolZero (
NonPagedPoolNx,
max(sizeof(KS_VIDEOINFOHEADER), ConnectionHeader->biSize + KS_SIZE_PREHEADER),
AVSHWS_POOLTAG
@@ -308,7 +308,7 @@ Return Value:
VideoInfoHeader);
m_VideoInfoHeader = reinterpret_cast <PKS_VIDEOINFOHEADER> (
- ExAllocatePoolWithTag (
+ ExAllocatePoolZero (
NonPagedPoolNx,
max(sizeof(KS_VIDEOINFOHEADER), KS_SIZE_VIDEOHEADER (ConnectionHeader)),
AVSHWS_POOLTAG
@@ -339,7 +339,7 @@ Return Value:
VideoInfoHeader2);
m_VideoInfoHeader = reinterpret_cast <PKS_VIDEOINFOHEADER> (
- ExAllocatePoolWithTag(
+ ExAllocatePoolZero(
NonPagedPoolNx,
max(sizeof(KS_VIDEOINFOHEADER), ConnectionHeader->bmiHeader.biSize + KS_SIZE_PREHEADER),
AVSHWS_POOLTAG
@@ -2100,7 +2100,18 @@ Return Value:
{
PAGED_CODE( );
+ // If the host process did not stop the pin, we need to do that before
+ // the CCapturePin object gets freed.
+ if (m_Pin->DeviceState != KSSTATE_STOP)
+ {
+ // Skip straight to the STOP state because our simulation doesn't
+ // really need the PAUSE and ACQUIRE transitions when stopping.
+ SetState(KSSTATE_STOP, m_Pin->DeviceState);
+ }
+
// Some reasonable default behavior.
+ GetFilter()->setPin(nullptr, m_Pin->Id);
+
return STATUS_SUCCESS;
}