Previously, if download failure occurred or interrupted by Ctrl-C, the
broken file is not removed. This is true for the first case because
"message(FATAL_ERROR ..." stops cmake and "file(REMOVE ..." is never
reached. After that, if cmake is run second time, SHA256 verification is
skipped and the broken file will be used.
This patch fixes this by using a temporary intermediate file. The file
data is downloaded into a temporary file first, then the temporary file
is atomically renamed to destination.
Error checking of download status is also improved. The if clause now
checks error code against zero more strictly, according to cmake's
documentation.
Replaced implicit type conversion within macOS plugins (mac-capture,
mac-syphon, mac-videotoolbox, mac-virtualcam) with explicit type
conversions to clear compile errors with Apple Clang 21.0 and Xcode
26.4.
Co-authored-by: PatTheMav <patthemav+github@gmail.com>
Co-authored-by: jcm <6864788+jcm93@users.noreply.github.com>
CreateFileW returns INVALID_HANDLE_VALUE on failure, not NULL.
The previous check would always evaluate to true on failure,
causing ReadFile and CloseHandle to be called on an invalid
handle.
Previously, the Image Slide Show source skipped *.webp files when
adding images via 'Add Directory'. This update ensures that .webp
files are now correctly included.
These modifiers cannot be used with the standard texture sampling
codepaths, so we need to reject them to avoid invalid GL operations.
Closesobsproject/obs-studio#12498
The NVENC session was destroyed before its child resources
(textures, surfaces) were cleaned up, causing resource cleanup
calls to operate on an invalid session handle.
Reorder destruction to free all registered resources before
destroying the encoder session.
This aligns obs_canvas_get_video_info() and obs_get_video_info() and
ensures the frame-rate is correct rather than returning the
potentially stale data stored in the canvas itself.
DEP: Enable DEP as it's still opt-in even on Windows 10. No OBS code or
plugins should be executing data as code and this is an important
mitigation against stack-based buffer overflows.
ASLR: Enable and force ASLR. This makes it harder for any potential
exploits to use fixed offsets into OBS or Windows DLLs to run gadgets.
Extension Points: Disable extension points. These are typically used for
system-wide code injection, and we have generally had trouble with
various things injecting into OBS and causing issues.
Handle Check: Enable strict handle checks when running debug builds.
This will raise an exception if we operate on an invalid handle,
something that should hopefully not ever happen in the current code.
The Yami theme provides colours for checked QPushButtons, but does not
do the same for checked QToolButton. This commit adds colors for the
QToolButton:checked: state that match the QPushButton:checked: colors
These calls introduce pipeline stalls in OpenGL on low end machines
which can contribute to a fairly significant 10-30% of total rendering
time.
The driver already needs to synchronize events within the context so
these calls are not needed for correctness for OpenGL.
Reverts much of PR #11906 in favor of a different way to detect whether
or not the output capabilities must be reset.
The new approach will contain false positives for which the workaround
is not needed but it won't have negative side effects.