From: Steinar H. Gunderson Date: Sun, 29 Apr 2018 10:09:34 +0000 (+0200) Subject: Make for faster shutdown of DeckLink cards. X-Git-Tag: 1.7.3~5 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=be7ba768a138bea4543a712c8261b1bfdc6e1dd0;p=nageru Make for faster shutdown of DeckLink cards. --- 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; }