From 5bd39f407ea6239fbbff87b8035bdeda905cca13 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Wed, 10 Apr 2013 21:18:59 -0700 Subject: [PATCH] made yet -another- god forsaken workaround for elgato filter crashes. --- DShowPlugin/DShowPlugin.cpp | 12 +++++++++--- DShowPlugin/DeviceSource.cpp | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/DShowPlugin/DShowPlugin.cpp b/DShowPlugin/DShowPlugin.cpp index 308e5b7a..fb8dc0e1 100644 --- a/DShowPlugin/DShowPlugin.cpp +++ b/DShowPlugin/DShowPlugin.cpp @@ -1,4 +1,4 @@ -/******************************************************************************** +/******************************************************************************** Copyright (C) 2012 Hugh Bailey This program is free software; you can redistribute it and/or modify @@ -1426,7 +1426,10 @@ INT_PTR CALLBACK ConfigureDialogProc(HWND hwnd, UINT message, WPARAM wParam, LPA outputPin = NULL; } - IAMCrossbar *crossbar = GetFilterCrossbar(filter); + String strDeviceName = configData->deviceNameList[id]; + bool bIsElworkaroundo = sstri(strDeviceName, TEXT("elgato")) != NULL; //HAHAHAHAHAHAHA HOW F***ING WONDERFUL. 自殺したい + + IAMCrossbar *crossbar = bIsElworkaroundo ? NULL : GetFilterCrossbar(filter); EnableWindow(GetDlgItem(hwnd, IDC_CROSSBAR), crossbar != NULL); SafeRelease(crossbar); @@ -1703,7 +1706,10 @@ INT_PTR CALLBACK ConfigureDialogProc(HWND hwnd, UINT message, WPARAM wParam, LPA L"DevicePath", configData->deviceIDList[id]); if (filter) { - IAMCrossbar *crossbar = GetFilterCrossbar(filter); + String strDeviceName = configData->deviceNameList[id]; + bool bIsElworkaroundo = sstri(strDeviceName, TEXT("elgato")) != NULL; //HAHAHAHAHAHAHA HOW F***ING WONDERFUL. 自殺したい + + IAMCrossbar *crossbar = bIsElworkaroundo ? NULL : GetFilterCrossbar(filter); if (crossbar) { OpenPropertyPages(hwnd, crossbar); crossbar->Release(); diff --git a/DShowPlugin/DeviceSource.cpp b/DShowPlugin/DeviceSource.cpp index 5954e181..7616d9d2 100644 --- a/DShowPlugin/DeviceSource.cpp +++ b/DShowPlugin/DeviceSource.cpp @@ -810,7 +810,7 @@ void DeviceSource::UnloadFilters() SafeReleaseLogRef(captureFilter); SafeReleaseLogRef(deviceFilter); - if(!bDeviceHasAudio) SafeReleaseLogRef(audioDeviceFilter); + SafeReleaseLogRef(audioDeviceFilter); SafeReleaseLogRef(audioFilter); bFiltersLoaded = false;