CMake 3.25 changed the way PDB generation is handled by only enabling
it for Debug and RelWithDebInfo builds, which prohibits generation of
fully optimized builds with associated symbols (which is MSVC's
default).
If configuring with CMake 3.25 or above, enable this globally for builds
using MSVC and fall back to embedded debug information for anything else
(which would probably be clang-cl).
Validate the Flatpak manifest before building it; then, validate
the build directory; and when publishing, validate the repository
as well.
Using flatpak-builder-lint in the org.flatpak.Builder Flatpak in a
docker container seems to not work.
So the linter repo is cloned and Poetry is used to run it inside an
custom action.
"--exceptions" is required to allow the manifest to pass since
OBS Studio has one for "--talk-name=org.freedesktop.Flatpak".
Co-authored-by: Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
This race condition is caused when one thread creates a swap chain,
which calls OBS_CreateSwapchainKHR, at the same time another thread
calls OBS_CreateImageView.
OBS_CreateSwapchainKHR allocates swap data, publishes this into the
data->swaps linked list, then initializes it. Meanwhile,
OBS_CreateImageView is iterating the swaps linked list, to see if the
image matches any swap chain images. Due to the order in
OBS_CreateSwapchainKHR, there's no guarantee this data is initialized
so it often ends up running out of bounds on the swap_images array.
The fix is simply to defer the swap data publish to after init.
Notable changes:
* deps.windows: Fix building against deps on Windows in Debug
Building OBS Studio (specifically obs-websocket) on Windows in Debug
against qrcodegencpp would fail due to workflow and caching issues
causing the previous release package to not contain all components.
Splits the WASAPINotify class out of win-wasapi.cpp and makes it a
shared object in the plugin, then also creates a callback to reset
audio monitoring if the default output device changes.
If a plugin removes a property when processing 'modified'
property callback, OBS WILL CRASH.
Example of offending plugin: obs-source-record
This commit moves callback processing to after iterating over
properties, thus removing the chance to crash OBS.
The previous commit sets the default configuration to 2 seconds, meaning
that the 0 second default interval no longer happens per default. If
someone explicitly sets the interval to 0 seconds ("auto"), we should
allow them to do that.
0 seconds means "auto" according to the documentation, but this appears
to be broken in many configurations (more than just CRF mode on Apple
Silicon). With some encoders it means that the encoder sets a keyframes
every 31st frame, other times it just doesn't set any keyframes at all
after the first one, only rarely does the "auto" interval actually
appear to work.
Lets just set the default to 2 seconds and be happy. In theory this is
the maximum keyframe interval and encoders are allowed to set more if
they so wish, but they never appear to do so.
Python automatically creates bytecode caches which end up inside the
application bundle of OBS Studio on macOS. These directories will lead
to a hash mismatch when Sparkle attempts to apply a delta update (to
ensure that the patch can be applied).
As the added directories will make the hash check fail, having a valid
Python framework configured in OBS Studio (even without any script
added) will thus prevent Sparkle from using delta updates.
This pattern uses fewer instructions and also avoids using max, which
does not work on infinity.
Also remove unreferenced techniques from scale filters.
Group resize is not deferred until adjustments are completed by a
mouseReleaseEvent in certain cases, resulting in unexpected movement of
sources that are part of a group as they are resized or stretched
beyond group bounds.
The bug can be described/reproduced as follow:
1. The user selects within a group in the sources dock
2. The user moves their mouse over the selected source such that the
cursor would change.
- This results in a cursor update and a call to GetStrechHandle()
- as the source is part of a group, stretchGroup will be set to the
group of the source
3. The user clicks on the canvas without touching a stretch/rotation
handle
- A mouseReleaseEvent is fired
- obs_sceneitem_defer_group_resize_end is called on the group as
stretchGroup is still defined from earlier
- the defer_group_resize member of the group will become negative
- The deferal check in resize_group (obs-scene.c) will always pass
now
4. When scaling or rotating the source close to the group bounds, the
group bounds will now dynamically update causing the source in to fly
off the canvas.
Resolves: https://github.com/obsproject/obs-studio/issues/9754
One notable difference from the AVC/HEVC code is that it also inserts
the METADATA and SEQUENCE_HEADER OBUs into new_packet, otherwise the
resulting video file wouldn't play.
Nothing about WHIP requires CBR (and many things that use it use VBR),
and there's no specific upstream service to care about it (WHIP is a
protocol, not a service, despite being exposed as a "service" in OBS),
so let's stop forcing it to be CBR and allow the user to choose other
rate control methods.
We were passing the core pipewire pointer where renegotiation expected
the stream pointer. Somehow this worked, probably because the two are
very close.
fixes#9733
Calling update_targetusage in update_params only updates the setting
when an encoder session is initialized. Calling update_targetusage in
rate_control_modified, like update_latency and update_enhancements, will
update the setting when the Settings window is loaded. This will cause
the updated setting to be reflected in the UI.
8dd20dfd33 introduced an explicit check
for the available macOS SDK, meaning that we can be sure that the macOS
13.1 SDK is available. As such, we do not require ifdef guards for the
availability of functions that are older than 13.1.
Loading these PNGs in libpng 1.6+ results in the warning:
libpng warning: iCCP: known incorrect sRGB profile
This is probably caused by saving an ICC Profile with the program used
to make the image, and that ICC Profile is considered invalid by libpng.
Removing the iCCP data resolves this.
Didn't realize OBS could output both program and preview views at the
same time with multiple devices.
Also remove render callbacks earlier on stop to avoid use-after-free.
After the cmake 3.0 rebuild glad was transitioned to a static library.
This lead to the glad symbols being uninitialized and crashes when they
are used in some cases.