From fc130015fa36ffc34bc9bc7db927f7980d451d8d Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 31 Mar 2019 14:36:11 +0200 Subject: [PATCH] Revert "Make for faster shutdown of DeckLink cards." This breaks turning on HDMI/SDI output mode from the GUI. This reverts commit be7ba768a138bea4543a712c8261b1bfdc6e1dd0. --- nageru/decklink_capture.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/nageru/decklink_capture.cpp b/nageru/decklink_capture.cpp index ab5e1ec..07031a1 100644 --- a/nageru/decklink_capture.cpp +++ b/nageru/decklink_capture.cpp @@ -350,11 +350,14 @@ void DeckLinkCapture::stop_dequeue_thread() fprintf(stderr, "StopStreams failed with error 0x%x\n", result); abort(); } - - // 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. - + 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); + } running = false; } -- 2.39.2