Revert "Make for faster shutdown of DeckLink cards."
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 31 Mar 2019 12:36:11 +0000 (14:36 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 17 Feb 2020 20:25:34 +0000 (21:25 +0100)
This breaks turning on HDMI/SDI output mode from the GUI.

This reverts commit be7ba768a138bea4543a712c8261b1bfdc6e1dd0.

nageru/decklink_capture.cpp

index ab5e1ec..07031a1 100644 (file)
@@ -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;
 }