obs-studio/plugins/win-dshow/virtualcam-module
jp9000 feda64e9c6 virtualcam-module: Fix crash on resolution change
Certain programs can start the virtualcam filter, then they may choose
to call `Stop()` on the filter, call `SetFormat()` to change the
resolution, then call `Run()` again to start the filter again. The
Windows virtual camera filter did not account for this, thus if the
resolution was different, it had potential to cause a crash.

To fix this, store the last filter resolution, then check the resolution
every frame, and if it changes, reset the scaling information.

(Author note: This code is unclean. What we need to do with the virtual
camera filter is make it only create the thread on `Run()`, then join
the thread on `Stop()`. It's currently a bit complicated to make it do
that at the moment, so this code is a kind of an annoying stopgap for
now.)
2022-10-15 01:42:07 -07:00
..
CMakeLists.txt win-dshow: Incorporate Elgato submodule 2022-08-18 10:44:59 -07:00
placeholder.cpp virtualcam-module: Only initialize placeholder once 2022-03-02 05:06:12 -08:00
sleepto.c win-dshow: Add Virtual Camera (Windows) 2020-07-07 06:09:59 -07:00
sleepto.h win-dshow: Add Virtual Camera (Windows) 2020-07-07 06:09:59 -07:00
virtualcam-filter.cpp virtualcam-module: Fix crash on resolution change 2022-10-15 01:42:07 -07:00
virtualcam-filter.hpp virtualcam-module: Fix crash on resolution change 2022-10-15 01:42:07 -07:00
virtualcam-module.cpp virtualcam-module: Return S_FALSE if locks non-zero 2022-07-26 07:40:11 -07:00
virtualcam-module.def.in win-dshow: Add Virtual Camera (Windows) 2020-07-07 06:09:59 -07:00