The upward compressor has a -60 dB threshold to stop increasing the
gain. At the threshold, the gain was not continuous, which is not ideal.
Co-authored-by: pkv <pkv@obsproject.com>
Signed-off-by: pkv <pkv@obsproject.com>
PipeWire supports two flags to signal an invalid buffer:
SPA_META_HEADER_FLAG_CORRUPTED signals that the whole buffer is invalid
and should not be used
SPA_CHUNK_FLAG_CORRUPTED signals that one single buffer plane is invalid
Skipping a buffer because of size 0 was moved to only the SHM case.
For DMA-BUFs the size of a single plane is not relevant and should be
ignored [1].
Compatibility note:
GNOME pre 43 sets the chunk size to 0 when a buffer copy failed.
Luckily GNOME doesn't use the META_Header and thus we can detect if we
should use the new or old style of invalid buffer detection.
This workaround should be dropped when reasonable.
[1] https://docs.pipewire.org/page_dma_buf.html
Currently, the X11 display may be leaked when the X11/EGL
platform is destroyed. Fix that by calling XCloseDisplay()
to free it.
Fixes: 2fd8a6df55 ("libobs-opengl: Introduce the X11/EGL winsys")
The platform display is not owned by libobs, it should not
be closed. Doing so results in heap use-after-frees when
Qt components try to use it while trying to show
a message box about the failure:
info: Initializing OpenGL...
error: Failed to initialize EGL: EGL_BAD_ACCESS
error: Failed to create context!
error: device_create (GL) failed
error: Failed to initialize video. Your GPU may not be supported, or your graphics drivers may need to be updated.
=================================================================
==2320345==ERROR: AddressSanitizer: heap-use-after-free on address 0x621000018668 at pc 0x7fcb75e20d6e bp 0x7ffe88d0e910 sp 0x7ffe88d0e900
READ of size 8 at 0x621000018668 thread T0
0 0x7fcb75e20d6d in XInternAtom /.../libx11/src/IntAtom.c:175
1 0x7fcb6bf5edfd in Kvantum::ThemeConfig::getCompositeSpec()
2 0x7fcb6bf0eb19 in Kvantum::Style::setSurfaceFormat(QWidget*) const
3 0x7fcb6bf11bae in Kvantum::Style::styleHint(QStyle::StyleHint, QStyleOption const*, QWidget const*, QStyleHintReturn*) const
4 0x5585cbce70b8 in OBSIgnoreWheelProxyStyle::styleHint(QStyle::StyleHint, QStyleOption const*, QWidget const*, QStyleHintReturn*) const /.../obs-studio/UI/obs-proxy-style.cpp:88
5 0x7fcb85826515 (/usr/lib/libQt6Widgets.so.6+0x226515)
6 0x7fcb859dbf1d (/usr/lib/libQt6Widgets.so.6+0x3dbf1d)
7 0x7fcb859dc5f0 in QMessageBox::QMessageBox(...)
8 0x7fcb859dc6b1 (/usr/lib/libQt6Widgets.so.6+0x3dc6b1)
9 0x5585cbd2fb31 in OBSErrorBoxva /.../obs-studio/UI/qt-wrappers.cpp:48
10 0x5585cbd2fd34 in OBSErrorBox(QWidget*, char const*, ...) /.../obs-studio/UI/qt-wrappers.cpp:55
11 0x5585cbcc3f36 in run_program /.../obs-studio/UI/obs-app.cpp:2475
12 0x5585cbcc52b4 in main /.../obs-studio/UI/obs-app.cpp:3358
13 0x7fcb82e3c28f (/usr/lib/libc.so.6+0x2328f)
14 0x7fcb82e3c349 in __libc_start_main
15 0x5585cbbd2f54 in _start
Fixes: 137966e01f ("libobs-opengl: Try to use the platform display if available")
Currently, the X11 display is leaked when the X11 hotkey
platform is destroyed. Fix that by calling XCloseDisplay()
to free it.
Fixes: bcb04bb800 ("libobs: Open a separate X11 connection for hotkeys")
Previously we passed the wrong display and formats/modifiers could not
be queried. This prevented pipewire sources from negotiating texture
sharing on x11.
- Don't repeatedly query version at runtime in case a user installs the
SDK while OBS is running
- Restore default DLL search directory
- Don't show outdated SDK message if the SDK is not found
- Protect minimum version macro with brackets
Previously, `custom_size` was checked at the end of the `scene_load`
function. If the scene contained no "items" array, the `custom_scene`
loading code would never be run.
This moves the `custom_size` code above the return statement.
-Wformat-security is enabled, some Linux packages build system have it
enabled.
https://github.com/obsproject/obs-studio/pull/5766
-Wunused-parameter is enabled too.
Also ensure that null conversion (C++ only for GCC) is enabled because its
enablement by default can depend on the CMake generator.
-Wswitch is enabled but it is kept as a warning. It was already enabled
with Clang.
If Clang has -Wshorten-64-to-32 enabled, keep it as warnings.