From be7ba768a138bea4543a712c8261b1bfdc6e1dd0 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 29 Apr 2018 12:09:34 +0200 Subject: [PATCH] Make for faster shutdown of DeckLink cards. --- decklink_capture.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/decklink_capture.cpp b/decklink_capture.cpp index 6dba068..6507959 100644 --- a/decklink_capture.cpp +++ b/decklink_capture.cpp @@ -468,14 +468,11 @@ void DeckLinkCapture::stop_dequeue_thread() fprintf(stderr, "StopStreams failed with error 0x%x\n", result); exit(1); } - if (input->DisableVideoInput() != S_OK) { - fprintf(stderr, "Failed to disable video input for card %d\n", card_index); - exit(1); - } - if (input->DisableAudioInput() != S_OK) { - fprintf(stderr, "Failed to disable audio input for card %d\n", card_index); - exit(1); - } + + // We could call DisableVideoInput() and DisableAudioInput() here, + // but they seem to be taking a really long time, and we only do this + // during shutdown anyway, so StopStreams() will suffice. + running = false; } -- 2.39.2