From 34615760ac747c2ef332123c0707ae0405572366 Mon Sep 17 00:00:00 2001 From: Norihiro Kamae Date: Mon, 26 Aug 2024 18:08:01 +0900 Subject: [PATCH] aja: Remove holding source settings The API `obs_source_update` accept NULL for the argument `settings` and it will just call the `update` callback without changing the settings. --- plugins/aja/aja-source.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/plugins/aja/aja-source.cpp b/plugins/aja/aja-source.cpp index 2b83f00cd..1aabc3b36 100644 --- a/plugins/aja/aja-source.cpp +++ b/plugins/aja/aja-source.cpp @@ -283,8 +283,6 @@ void AJASource::CaptureThread(AJAThread *thread, void *data) AudioOffsets offsets; ResetAudioBufferOffsets(card, audioSystem, offsets); - obs_data_t *settings = obs_source_get_settings(ajaSource->mSource); - AudioRepacker *audioRepacker = new AudioRepacker(ConvertRepackFormat(sourceProps.SpeakerLayout(), sourceProps.swapFrontCenterLFE), sourceProps.audioSampleSize * 8); @@ -292,7 +290,7 @@ void AJASource::CaptureThread(AJAThread *thread, void *data) while (ajaSource->IsCapturing()) { if (card->GetModelName() == "(Not Found)") { os_sleep_ms(250); - obs_source_update(ajaSource->mSource, settings); + obs_source_update(ajaSource->mSource, nullptr); break; } @@ -321,7 +319,7 @@ void AJASource::CaptureThread(AJAThread *thread, void *data) NTV2VideoFormatToString(videoFormat, true).c_str(), NTV2VideoFormatToString(newVideoFormat, true).c_str()); os_sleep_ms(250); - obs_source_update(ajaSource->mSource, settings); + obs_source_update(ajaSource->mSource, nullptr); break; } @@ -391,8 +389,6 @@ void AJASource::CaptureThread(AJAThread *thread, void *data) audioRepacker = nullptr; } ajaSource->GenerateTestPattern(sourceProps.videoFormat, sourceProps.pixelFormat, NTV2_TestPatt_Black); - - obs_data_release(settings); } void AJASource::Deactivate()