mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-05-19 05:51:16 -04:00
decklink: Use ComPtr for variables
This makes sure Decklink variables are automatically released. Closes https://github.com/obsproject/obs-studio/pull/5508
This commit is contained in:
@@ -16,8 +16,8 @@ struct obs_output_info decklink_output_info;
|
||||
|
||||
bool log_sdk_version()
|
||||
{
|
||||
IDeckLinkIterator *deckLinkIterator;
|
||||
IDeckLinkAPIInformation *deckLinkAPIInformation;
|
||||
ComPtr<IDeckLinkIterator> deckLinkIterator;
|
||||
ComPtr<IDeckLinkAPIInformation> deckLinkAPIInformation;
|
||||
HRESULT result;
|
||||
|
||||
deckLinkIterator = CreateDeckLinkIteratorInstance();
|
||||
@@ -42,8 +42,6 @@ bool log_sdk_version()
|
||||
|
||||
blog(LOG_INFO, "Decklink API Installed version %s",
|
||||
versionString.c_str());
|
||||
|
||||
deckLinkAPIInformation->Release();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user