From: Steinar H. Gunderson Date: Sun, 22 Jan 2017 21:52:01 +0000 (+0100) Subject: The DeckLink manual recommends pause + flush over stop for changing mode. X-Git-Tag: 1.5.0~67 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=a0083c1e4712a6e9f7c468f0961b292cfd9b69b0;p=nageru The DeckLink manual recommends pause + flush over stop for changing mode. --- diff --git a/decklink_capture.cpp b/decklink_capture.cpp index 16c187d..92fd6ae 100644 --- a/decklink_capture.cpp +++ b/decklink_capture.cpp @@ -443,8 +443,12 @@ void DeckLinkCapture::stop_dequeue_thread() void DeckLinkCapture::set_video_mode(uint32_t video_mode_id) { - if (input->StopStreams() != S_OK) { - fprintf(stderr, "StopStreams failed\n"); + if (input->PauseStreams() != S_OK) { + fprintf(stderr, "PauseStreams failed\n"); + exit(1); + } + if (input->FlushStreams() != S_OK) { + fprintf(stderr, "FlushStreams failed\n"); exit(1); }