When using a PTS divisor, OBS would still increment the PTS by only the
original `fps_den` value, not considering that PTS values should be
multiplied by the divisor.
For example, `60/1` increases like `0,1,2,3`. `60000/1001` increases
like `0,1001,2002,3003`.
Without this fix, `60/1` main OBS framerate with a divisor of `2`
produces `0,1,2,3`, while the correct pattern would be `0,2,4,6`
(cherry picked from commit 05d52ee3a7)
A few reports came in of cache files with the correct size but full of
null bytes, presumably from a system crash and an SSD lying about buffer
flushes. This commit adds a checksum at the end of the compiled bytecode
so we don't try to use invalid data.
Co-Authored-By: derrod <dennis@obsproject.com>
(cherry picked from commit 1641812580)
Before the commit 763dddbbaf, hotkeys to show and hide scene items are
distinguished by source name instead of ID. When migrating from the
legacy data structure, the pointer to the data was not released.
(cherry picked from commit 9391ab305e)
An already-removed item has a NULL `item->parent`, meaning that calling
`full_lock(scene)` results in undefined behavior. This makes the method
return earlier if the specified item is removed instead of attempting
to lock the scene.
No thread safety is changed, because it wasn't thread-safe to begin
with.
(cherry picked from commit 3e6797ca5b)
We use a size_t that can be 64bit while EGL uses 32bit for the
underlying value. Writes from our graphics function can leave high bits
uninitialized and cause iteration of the format list to overlfow.
fixes#9844
(cherry picked from commit ea1d022c20)
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>
(cherry picked from commit 9f8655921f)
Use more recent commits. Use a specific commit hash instead of v6.3
to include a fix for the order of arguments in some cases.
(cherry picked from commit 5f264272e5)
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.
(cherry picked from commit aa1f2dea84)
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.
(cherry picked from commit e9e3df4c5d)
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.
(cherry picked from commit b081adf72e)
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.
(cherry picked from commit 24073568e5)
This pattern uses fewer instructions and also avoids using max, which
does not work on infinity.
Also remove unreferenced techniques from scale filters.
(cherry picked from commit e79e28598b)
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
(cherry picked from commit c76760bc1c)
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
(cherry picked from commit 658657de35)
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.
(cherry picked from commit 20ffdda89a)
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.
(cherry picked from commit ba4467199c)
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.
(cherry picked from commit b4c36c0530)
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.
(cherry picked from commit 6aaf0358ca)
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.
(cherry picked from commit 5cf0f06669)
We refactored this data to be part of the format properties instead of
an out parameter. But forgot to start using this field instead.
(cherry picked from commit 454fc559a2)
These functions log that they should be used with the thread lock held,
so lets hold the lock before calling them.
(cherry picked from commit f0697980c3)