Skip to content

Commit

Permalink
fix: decklink output with driver 14.3 broken
Browse files Browse the repository at this point in the history
due to missing QueryInterface implementation on IDecklinkVideoFrame
  • Loading branch information
Julusian committed Jan 4, 2025
1 parent fb54853 commit 618affd
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions src/modules/decklink/consumer/decklink_consumer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,20 +253,10 @@ class decklink_frame

HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID* ppv) override
{
/* Implementation from the SignalGenHDR example in the Decklink SDK */

#ifdef _WIN32
IID iunknown = IID_IUnknown;
#else
REFIID iunknown = IID_IUnknown;
#endif
HRESULT result = E_NOINTERFACE;

if (ppv == nullptr)
return E_INVALIDARG;

//// Initialise the return result
*ppv = nullptr;
REFIID iunknown = IID_IUnknown;

if (std::memcmp(&iid, &iunknown, sizeof(REFIID)) == 0) {
*ppv = this;
Expand All @@ -277,9 +267,12 @@ class decklink_frame
} else if (hdr_ && std::memcmp(&iid, &IID_IDeckLinkVideoFrameMetadataExtensions, sizeof(REFIID)) == 0) {
*ppv = static_cast<IDeckLinkVideoFrameMetadataExtensions*>(this);
AddRef();
} else {
*ppv = nullptr;
return E_NOINTERFACE;
}

return result;
return S_OK;
}

ULONG STDMETHODCALLTYPE AddRef() override { return ++ref_count_; }
Expand Down

0 comments on commit 618affd

Please sign in to comment.