From 451fbcc33ca589b7d3f0bbd3c003291dc29d516e Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Fri, 1 Apr 2022 09:32:19 +0200 Subject: [PATCH] DeckLink cap.: set conn explicitly to Unspecified bmdVideoConnectionUnspecified is still 0 but it makes it clear that the value is recognized by BMD API (as opposite to 0 in conversion mode). --- src/video_capture/decklink.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/video_capture/decklink.cpp b/src/video_capture/decklink.cpp index 2c88d71e2..a4b5a892e 100644 --- a/src/video_capture/decklink.cpp +++ b/src/video_capture/decklink.cpp @@ -175,7 +175,8 @@ struct vidcap_decklink_state { unsigned int grab_audio:1; /* wheather we process audio or not */ bool stereo{false}; /* for eg. DeckLink HD Extreme, Quad doesn't set this !!! */ bool sync_timecode{false}; /* use timecode when grabbing from multiple inputs */ - BMDVideoConnection connection{}; + static_assert(bmdVideoConnectionUnspecified == BMD_OPT_DEFAULT, "Connection unspecified is not 0!"); + BMDVideoConnection connection{bmdVideoConnectionUnspecified}; int audio_consumer_levels{-1}; ///< 0 false, 1 true, -1 default BMDVideoInputConversionMode conversion_mode{}; BMDDeckLinkCapturePassthroughMode passthrough; // 0 means don't set