0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-19 20:32:15 +02:00

virtualcam-module: Fix incorrect correct res/fps

Apparently the testing that was done was not sufficient enough or did
not check all test cases, so resolution/fps does not get set properly on
the virtualcam.
This commit is contained in:
jp9000 2022-03-02 04:19:02 -08:00
parent f186b8c304
commit 3f3f9ed7e6

View File

@ -45,17 +45,6 @@ VCamFilter::VCamFilter()
in_obs = !!wcsstr(file, obs_process);
/* ---------------------------------------- */
AddRef();
}
void VCamFilter::ActuallyStart()
{
if (th.joinable()) {
return;
}
/* ---------------------------------------- */
/* add last/current obs res/interval */
@ -114,7 +103,15 @@ void VCamFilter::ActuallyStart()
}
/* ---------------------------------------- */
/* Actually start */
AddRef();
}
void VCamFilter::ActuallyStart()
{
if (th.joinable()) {
return;
}
ResetEvent(thread_stop);
th = std::thread([this] { Thread(); });
@ -129,6 +126,12 @@ void VCamFilter::ActuallyStop()
SetEvent(thread_stop);
th.join();
}
VCamFilter::~VCamFilter()
{
ActuallyStop();
video_queue_close(vq);
if (placeholder.scaled_data) {
@ -137,11 +140,6 @@ void VCamFilter::ActuallyStop()
}
}
VCamFilter::~VCamFilter()
{
ActuallyStop();
}
const wchar_t *VCamFilter::FilterName() const
{
return L"VCamFilter";