summaryrefslogtreecommitdiff
path: root/avstream/avscamera/sys/Capture.cpp
diff options
context:
space:
mode:
authorJoel Corley <[email protected]>2020-01-21 15:47:24 -0800
committerJoel Corley <[email protected]>2020-01-21 15:47:24 -0800
commit1d2865d33a2815c31a93bf9b352b94b096f72f57 (patch)
tree1b5b52208d3d8254709b1a2f128618753d77ec58 /avstream/avscamera/sys/Capture.cpp
parent8fb512ac674df5ba129a69906d450f2a1361136d (diff)
Update all the AvStream samples for Vibranium.
Diffstat (limited to 'avstream/avscamera/sys/Capture.cpp')
-rw-r--r--avstream/avscamera/sys/Capture.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/avstream/avscamera/sys/Capture.cpp b/avstream/avscamera/sys/Capture.cpp
index e5d43ddd..aadaca4e 100644
--- a/avstream/avscamera/sys/Capture.cpp
+++ b/avstream/avscamera/sys/Capture.cpp
@@ -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;
}