aja: Fix crash when capture thread is reset

master
Paul Hindt 2022-01-18 04:28:37 -08:00 committed by Colin Edwards
parent 04bf12f130
commit a59f6c4e50
1 changed files with 2 additions and 2 deletions

View File

@ -187,6 +187,8 @@ void AJASource::CaptureThread(AJAThread *thread, void *data)
}
auto sourceProps = ajaSource->GetSourceProps();
ajaSource->ResetVideoBuffer(sourceProps.videoFormat,
sourceProps.pixelFormat);
auto inputSource = sourceProps.InitialInputSource();
auto channel = sourceProps.Channel();
auto audioSystem = sourceProps.AudioSystem();
@ -1028,8 +1030,6 @@ static void aja_source_update(void *data, obs_data_t *settings)
}
ajaSource->SetSourceProps(want_props);
ajaSource->ResetVideoBuffer(want_props.videoFormat,
want_props.pixelFormat);
aja::Routing::StartSourceAudio(want_props, card);
card->SetReference(NTV2_REFERENCE_FREERUN);
ajaSource->Activate(true);