From ca88ba8bbc088d84eead58d19f9610403ec70a12 Mon Sep 17 00:00:00 2001 From: tt2468 Date: Tue, 11 May 2021 18:06:29 -0700 Subject: [PATCH] decklink: Fix crash during shutdown when output is on The actual crash is caused because obs_module_unload() is called before the decklink outputs are stopped. In obs_module_unload(), the deviceEnum pointer is freed. During decklink_output_stop(), the removed code tries to retrieve a reference of the decklink device from the deviceEnum and crashes because it has already been freed. This code appears to serve no purpose anyway, so we remove it. --- plugins/decklink/decklink-output.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/plugins/decklink/decklink-output.cpp b/plugins/decklink/decklink-output.cpp index 61ae3d890..46b42da4b 100644 --- a/plugins/decklink/decklink-output.cpp +++ b/plugins/decklink/decklink-output.cpp @@ -104,10 +104,6 @@ static void decklink_output_stop(void *data, uint64_t) obs_output_end_data_capture(decklink->GetOutput()); - ComPtr device; - - device.Set(deviceEnum->FindByHash(decklink->deviceHash)); - decklink->Deactivate(); }