From 2f8d28f7fa15249399382875088346db8831f38b Mon Sep 17 00:00:00 2001 From: jp9000 Date: Fri, 2 Sep 2022 17:06:50 -0700 Subject: [PATCH] decklink: Keep deckLinkConfiguration while in use Apparently this annoying, stupid variable was leaking before the ComPtr was added, which ironically was necessary to ensure devices worked. After that ComPtr commit some devices stopped capturing properly. Basically, it implies that this pointer needs to stick around while the device is in use. (Jim note: This was one of the most painful things I've ever had to debug) --- plugins/decklink/decklink-device-instance.cpp | 1 - plugins/decklink/decklink-device-instance.hpp | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/decklink/decklink-device-instance.cpp b/plugins/decklink/decklink-device-instance.cpp index d39585cb1..e9e4d362a 100644 --- a/plugins/decklink/decklink-device-instance.cpp +++ b/plugins/decklink/decklink-device-instance.cpp @@ -371,7 +371,6 @@ bool DeckLinkDeviceInstance::StartCapture(DeckLinkDeviceMode *mode_, if (!device->GetInput(&input)) return false; - ComPtr deckLinkConfiguration; HRESULT result = input->QueryInterface(IID_IDeckLinkConfiguration, (void **)&deckLinkConfiguration); if (result != S_OK) { diff --git a/plugins/decklink/decklink-device-instance.hpp b/plugins/decklink/decklink-device-instance.hpp index 20f80cdbc..4fed306a0 100644 --- a/plugins/decklink/decklink-device-instance.hpp +++ b/plugins/decklink/decklink-device-instance.hpp @@ -13,6 +13,7 @@ class DecklinkBase; class DeckLinkDeviceInstance : public IDeckLinkInputCallback { protected: + ComPtr deckLinkConfiguration; struct obs_source_frame2 currentFrame; struct obs_source_audio currentPacket; struct obs_source_cea_708 currentCaptions;