Commit Graph
100 Commits
Author SHA1 Message Date
Richard StanwayandRyan Foster e86c7e501e frontend: Abort if obs-transitions failed to load
The frontend UI assumes transitions are always available and crashes if
none are present. Resolving the crashes resulted in a completely broken
UI, so it's safe to assume that transitions are a core requirement for a
working OBS.

Crash reports indicate that obs-transitions is failing to load for some
users, so we should handle the case where no transitions load and abort
with an error instead of crashing.
2026-08-20 22:41:07 -04:00
Richard StanwayandRyan Foster 88de106cff frontend, plugins: Remove PreferSystem32Images mitigation
This process mitigation flag is inherited by child processes and applies
to load-time DLL resolution, pushing the application's own directory
below the system directories. If there are system-installed copies of
dependent DLLs such as FFmpeg, those get loaded when OBS is updated as
the updater and subsequent relaunch of OBS inherit the mitigation.

As we use SetDefaultDllDirectories, this mitigation is less important,
the proper fix would be to use /DEPENDENTLOADFLAG to protect load-time
import resolution.
2026-08-04 17:19:45 -04:00
Richard StanwayandRyan Foster e2e0bfc8fc win-capture: Log hook DLL install / update errors
We suspect users hit errors updating the system-wide hook files even if
the file is not in use, but without logging we have no way to know for
sure. This commit adds additional logs. Not logging source paths
anywhere is intentional to avoid wide char to utf-8 issues making this
more complicated than it needs to be - the source will always be the OBS
install dir regardless.
2026-07-24 17:31:49 -04:00
Richard StanwayandRyan Foster d7a6a8e1b7 win-capture: Resolve inject helper and hook path to absolute paths 2026-07-24 11:40:08 -04:00
Richard StanwayandRyan Foster 9d38a93831 frontend: Add Image SAFER to DLL blocklist
More useless "security" software to try to prevent screenshots that
installs global hooks and kernel drivers. Crash reports indicate that
their hook attaches to and subsequently crashes OBS.
2026-07-14 15:12:13 -04:00
Richard StanwayandRyan Foster 091dbeec81 frontend: Merge Windows process mitigation functions
We already started using SetProcessMitigationPolicy before #5164 got
merged and we dropped Windows 7 support, so we can do away with the
runtime detection too.
2026-06-26 14:38:23 -04:00
Richard StanwayandRyan Foster 9541600b3d nv-filters: Improve handling of SDK DLL loading 2026-06-05 15:27:30 -04:00
Richard StanwayandRyan Foster e29a640ddd obs-ffmpeg, win-capture: Use better default DLL directory settings 2026-06-05 15:27:30 -04:00
Richard StanwayandRyan Foster 8801dbef06 libobs: Avoid calling SetDllDirectory when looking for dependent DLLs
Using the full path and appropriate LoadLibraryEx flags is safer as it
gives us more control over the search paths.
2026-06-05 15:27:30 -04:00
Richard StanwayandRyan Foster 77eabcc06a frontend: Set better default DLL directory settings on Windows
This helps mitigate "DLL planting" attacks by removing the current
directory from most DLL loading calls.
2026-06-05 15:27:30 -04:00
Richard StanwayandRyan Foster 76ea10e281 coreaudio-encoder: Avoid using SetDllDirectory, specify full path 2026-06-05 15:27:30 -04:00
Richard StanwayandRyan Foster cd7562791f frontend: Apply process mitigation policies for Windows
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.
2026-05-08 14:08:12 -04:00
Richard StanwayandRyan Foster 1106c1acaf updater: Add log window and additional log messages 2026-02-20 15:16:35 -05:00
Richard StanwayandRyan Foster 6340d7a845 updater: Check return values in ClearShaderCache
Invoking filesystem::remove_all on potentially truncated paths seems
like a bad idea.
2026-02-18 15:26:28 -05:00
Richard StanwayandRyan Foster 8752a20830 updater: Fix incorrect format specifier 2026-02-10 17:46:18 -05:00
Richard StanwayandRyan Foster 1866f8c1e6 updater: Don't force file flushes when writing new files
Using FILE_FLAG_WRITE_THROUGH causes a flush to disk on each file which
is bad for performance.
2026-02-10 17:46:18 -05:00
Richard StanwayandRyan Foster 95bfb81f69 updater: Improve exception handling
Logs exceptions and changes QuickWriteFile to throw a catchable
exception instead of a DWORD.
2026-02-10 17:46:18 -05:00
Richard StanwayandRyan Foster e715df130b updater: Fix various race conditions and error handling
The main race was possible concurrent access to unordered_map which
could corrupt internal state. Our global variables were also not
atomically updated. DownloadWorkerThread also returned true on error,
which could cause the updater to proceed without all updates being
downloaded which would then fail at the install stage.
2026-02-10 17:46:18 -05:00
Richard StanwayandRyan Foster efca325c2c frontend, plugins: Set default bitrate to 6000 kbps
The default of 2500 kbps was chosen 10 years ago and times have changed.
Logs and forums posts show that many users of OBS for recording don't
change their bitrate and end up with a 2.5 mbps recording which looks
terrible.

Now that service bitrate enforcement exists, this will be automatically
capped to the maximum bitrate for streaming services, so the only time
this should result in a problem is if the user's upload speed is the
limiting factor, hopefully rarer these days with increasing internet
speeds.
2025-09-17 19:56:04 -04:00
Richard StanwayandRyan Foster ab48cd0b3d UI: Add TikTok Live Studio Virtual Camera to DLL blocklist
Ref: https://www.hanselman.com/blog/webcam-randomly-pausing-in-obs-discord-and-websites-lsvcam-and-tiktok-studio
2024-10-30 14:16:47 -04:00
Richard StanwayandRyan Foster 1e6c375e95 happy-eyeballs: Specify AI_ADDRCONFIG for getaddrinfo
This might help to avoid returning IPv6 addresses on systems without
IPv6 connectivity.
2024-08-12 20:02:04 -04:00
Richard StanwayandRyan Foster 78ffd99ab1 happy-eyeballs: Move happy_eyeballs_destroy to a thread
On Windows, shutdown() will not interrupt a blocking connect() call, so
happy_eyeballs_destroy could block until the remaining candidates timed
out. As happy_eyeballs_destroy is called in the RTMP connect path, this
would stall the RTMP connection and cause the winning candidate's socket
to be disconnected due to a timeout.
2024-08-12 20:02:04 -04:00
Richard StanwayandRyan Foster fce534572b happy-eyeballs: Reserve array length for all candidates
The code currently assumes that the array does not change during
execution, this assumption is violated when the darray resizes causing
previous pointers to point to invalid memory and cause undefined
behavior and crashes.

This may need refactoring in the future, this commit simply fixes the
issue for now.
2024-08-12 20:02:04 -04:00
Richard StanwayandRyan Foster f9f4171d56 UI: Add null checks before doing some API calls
Harmless, but generated a debug warning for null pointers passed into
the API.
2024-06-08 15:25:04 -04:00
Richard StanwayandRyan Foster ffdf541672 UI: Fix crash when entering settings
We refer to VOD tracks as 1-6 but internally the array is 0-5 so there's
an off-by-one error here.
2024-06-05 19:23:40 -04:00
Richard StanwayandPatrick Heyer 87c536ebe0 image-source: Use mutex when accessing slideshow
While adding or updating files locked this mutex, the graphics thread
did not. As the update operation is not atomic, the graphics thread
might access the darray in the middle of an update, resulting in access
to freed memory (crash) if the files were updated at the same time.
2023-12-10 01:39:58 +01:00
1641812580 libobs-d3d11: Add checksum to shader cache
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>
2023-11-20 04:32:56 -06:00
Richard StanwayandLain c71bbcf4d9 UI: Avoid using newlines in error messages
Some errors include HTML links directing users to e.g. driver updates
or further information. Using a raw newline instead of <br> causes Qt to
skip parsing the HTML, resulting in an ugly mess of HTML displayed to
the user instead of the intended links.
2023-09-12 17:54:42 -07:00
Richard StanwayandLain e5472c775c UI: Standardize spelling of closable, fix typo 2023-09-11 09:56:27 -07:00
Richard StanwayandLain d8bf21de2f UI: Add cleanup of stats callback on window close
Moving the cleanup to OBS_FRONTEND_EVENT_EXIT in #8735 only handled the
cleanup from the dockable window, as the regular stats window is deleted
on close when the UI is shut down. This caused an event handler leak
each time the window is manually closed, resulting in crashes. This code
looks a bit wrong since we delete the same handler in multiple places,
but this is due to the code being used by both the dock (non-closable)
and the window (closable). The OBS_FRONTEND_EVENT_EXIT handler handles
cleanup from the dockable stats window, and the window close handler now
handles cleanup from the non-dockable stats window.
2023-09-11 09:19:54 -07:00
Richard StanwayandLain d3ab68c5ca plugins: Quote program paths used in os_process_pipe_create
These end up being passed to CreateProcessW, so paths with spaces in the
name may be open to misinterpretation by the OS.
2023-08-26 16:44:53 -07:00
Richard StanwayandLain fef92a8a43 libobs: Log if CreateProcessW fails on Windows
This is used by the test programs as well as ffmpeg-mux. If a process
fails to start it's quite bad so we would like to know why.
2023-08-26 16:44:53 -07:00
Richard StanwayandLain 609b1ab011 obs-qsv11: Fix crash in QSV test process
The code assumed MFXCreateSession would always succeed, but it fails on
systems with no QSV implementations, causing a crash when we call
MFXClose later. Additional success checks for the other API calls were
also added.
2023-08-18 17:55:00 -07:00
e7a3ffdb54 libobs-d3d11: Implement shader cache
Co-Authored-By: derrod <dennis@obsproject.com>
2023-07-22 16:59:31 -07:00
Richard Stanway b7fddceb67 updater: Treat mapped file errors as a sharing violation
For whatever reason there exists a different error code if the file has
been opened as a mapped file, so we need to handle it.
2023-07-21 03:02:31 +02:00
Richard StanwayandLain d997a56fb6 UI: Destroy the frontend API after OBS_FRONTEND_EVENT_EXIT
The frontend API was never explicitly cleaned up which has lead to
several crashes from plugins continuing to call it even after OBS itself
has been destroyed. We now destroy the API after the exit event, so
further calls by plugins will be no-ops instead of potentially accessing
destroyed OBS state.

This also required some changes to our own use of the API, as we relied
on the OBSBasic destructor to clean up some callbacks, by which point
the API should have already been destroyed.
2023-07-15 16:54:51 -07:00
Richard StanwayandLain f7eb634788 docs: Clarify OBS_FRONTEND_EVENT_EXIT intent 2023-07-15 16:54:51 -07:00
Richard StanwayandLain 4118fa7ac1 libobs: Don't defer encoder updates if not necessary
When #5169 implemented deferred encoder updates, it did not account for
the case when the encoder hadn't started yet. This means the encoder would
start and then immediately call update with the same settings it was
started with, which in the case of some hardware encoders would trigger
a reconfiguration request to the driver.
2023-07-15 16:31:19 -07:00
Richard StanwayandLain 896cd4adb2 libobs: Detect and log presence of Lenovo Vantage on Windows
This software seems to be pre-installed on many Lenovo systems and has a
"Network Boost" feature that restricts data usage of background apps,
causing throughput issues when streaming with OBS.
2023-06-24 16:31:21 -07:00
Richard StanwayandLain b756c78f44 win-capture: Skip compat helper matching if properties are null
Fixes compatibility messages appearing when no window is selected
in window capture properties.
2023-06-09 04:46:10 -07:00
Richard StanwayandGitHub 48a0e7822a obs-outputs: Remove support for "RTMP Go Away" feature (#8959)
Meta have filed a patent application on the Go Away feature. This goes
against the spirit of free software and puts the use of this feature in
questionable legal status, so let's remove this code until the patent
situation is resolved.

This reverts commits a593fe6755 and
dada82fec1.
2023-05-26 13:55:48 -05:00
Richard StanwayandJim 4176f9b13a UI: Fix crash when double-clicking projector
If "transition on double click" was enabled, OBS assumed all double
clicks were going to multiview projectors, which isn't necessarily the
case.
2023-05-13 16:38:09 -07:00
Richard StanwayandRyan Foster ba0c273846 obs-ffmpeg: Show error if trying to use AV1 fallback 2023-05-05 15:58:13 -04:00
Richard StanwayandRyan Foster 132f0b85fc UI: Relax mc_trans_video_imagescaler.dll DLL block
This is actually a MainConcept redistributable and not related to Adobe.
Unfortunately Elgato Game Capture HD software relies on this dependency
when presenting the DirectShow device to OBS, so we unintentionally
blocked it from loading.

Instead of outright blocking, we now block only older versions than the
version shipped by Elgato, which has hopefully been patched to fix the
random crashes.
2023-05-03 19:16:18 -04:00
Richard StanwayandJim b9ef64d4eb deps/media-playback: Check if frame can be played before using it
It's possible that frame_ready is false when this function is called,
which implies that the mp_decode frame field is not valid. However we
dereference the frame by counting the number of audio channels before
checking the value of frame_ready, causing a crash.
2023-04-30 16:23:16 -07:00
Richard StanwayandJim 7ceb39bd56 deps/media-playback: Initialize mutex earlier for cached media
mp_cache_stop / mp_cache_free both try to use the mutex so we need to
make sure it's initialized before calling functions that may fail.
2023-04-29 11:30:01 -07:00
Richard StanwayandJim 1d7c066cf5 UI: Avoid calling libobs functions with null pointers in projectors 2023-04-14 15:50:59 -07:00
Richard StanwayandRyan Foster bacc3ac8ed UI: Add Citrix ICAService to Windows DLL blocklist 2023-04-12 21:32:49 +00:00
Richard StanwayandRodney 9cdd847445 UI: Fix incorrect use of QT_TO_UTF8 in SpeakerLayoutChanged
The string is immediately destroyed after use, so taking a pointer to it
ends up pointing to invalid memory. Let's avoid using QT_TO_UTF8 here.
2023-04-05 21:26:21 +00:00
Richard StanwayandRodney 820fba2d7f UI: Remove unnecessary variables type conversions
Detected by PVS Studio.
2023-04-05 00:40:31 +02:00
Richard StanwayandRodney a781f4a887 UI: Don't std::move main in SetUndoProperties
main is used later in the function, making this undefined behavior.
Though we can move the scene_name string.

Detected by PVS Studio.
2023-04-03 21:47:14 +02:00
Richard StanwayandJim 0f614034ca obs-ffmpeg: Handle mux errors when writing replay buffer
Without this, we could continuously call signal_failure in write_packet,
crashing OBS with a stack overflow with all the error callbacks.
2023-04-01 16:21:37 -07:00
Richard StanwayandRyan Foster d71fa5248f obs-ffmpeg: Fix memory corruption during cleanup
We were calling avio_close on a field that might have held an
AVIOContext. This commit checks which type was allocated so we
can call the appropriate cleanup function.
2023-03-31 13:19:48 -04:00
Richard StanwayandRyan Foster e0f674de86 UI: Add AMD AV1 encoder to simple output mode
Fixes https://github.com/obsproject/obs-studio/issues/8584
2023-03-30 22:04:07 -04:00
Richard StanwayandRyan Foster 9a24b1ad06 UI: Update Windows DLL blocklist
- Add Bandicam
- Add VirtualMotionCapture (unity capture)
- Add HolisticMotionCapture (unity capture)

Fixes https://github.com/obsproject/obs-studio/issues/8552
2023-03-30 21:16:35 -04:00
Richard StanwayandRyan Foster 0ed53ada03 obs-ffmpeg: Use more actionable error messages for hardware encoders
Telling a user to "Check your driver is up to date" is too open to
interpretation, many users will use Windows Update or Device Manager to
check for updates which doesn't help. Instead, let's explicitly tell
them what is most likely to fix the problem.
2023-03-25 22:48:19 -04:00
Richard StanwayandJim 5182368009 UI: Properly handle SIGINT on non-Windows platforms
Running Qt code in a signal handler is not safe. Per the Qt docs, we
instead create a pair of sockets and a QSocketNotifier so that the
signal handler can notify the main thread which can process the exit
request without risk.

Reference: https://doc.qt.io/archives/qt-6.3/unix-signals.html
Reference: https://man7.org/linux/man-pages/man7/signal-safety.7.html
2023-03-25 16:17:02 -07:00
Richard StanwayandJim c9dd230a72 obs-outputs: Explicitly close RTMP socket on send error
Some send() errors are not treated as fatal but the connection gets shut
down regardless. When this happens, librtmp may send an FCunpublish
message which various services interpret as an "end of stream" message
and disable features like "disconnect protection". Instead, let's
explicitly close the socket so that the remote end is aware that this is
an unclean disconnect.
2023-03-18 15:38:54 -07:00
Richard StanwayandJim e305b0f172 UI: Add old Vtuber Maker versions to DLL blocklist
This DLL is based on Unity Capture and suffers from the same deadlock
bug as many similar filters. A fixed version was released on 2023-03-14.
https://store.steampowered.com/news/app/1368950/view/3674412925835790027
2023-03-18 15:23:52 -07:00
Richard Stanway 7e9b071a6c obs-ffmpeg: Add GeForce MX450 variant to unsupported NVENC list 2023-03-18 13:31:42 +01:00
Richard StanwayandRyan Foster 9d4a7f01dd UI: Add DLL blocking functionality for Windows
Adds a NtMapViewOfSection hook which we can use before DLLs are loaded
to decide whether to abort the process. This is useful for blocking
known problematic DLLs that cause crashes. In addition, the PE timestamp
can be checked to block only older DLLs such as older versions of Vtuber
virtual cameras with known deadlock bugs.

A simple counter of each DLL is used for logging purposes. Since DLLs
can be blocked at any time, the output is only logged on exit of OBS.
2023-03-09 14:16:34 -05:00
Richard StanwayandJim 2468268569 libobs: Hold async mutex when calling set_async_texture_size
Calling set_async_texture_size without holding async_mutex is dangerous
as cur_async_frame could be changed / freed by another thread.
2023-03-04 16:10:19 -08:00
Richard StanwayandJim bb7ca3c2c3 UI: Add mutex for writing to the log file
fstream is not thread-safe and the act of writing the string and the
newline are two separate operations which could execute concurrently in
multiple threads, resulting in lines joining together followed by two
newlines. Due to the presence of a static mutex, this also removes
inline on the function.
2023-03-04 15:34:17 -08:00
Richard StanwayandJim 01786a3f11 libobs: Disable encoder scaling request if it matches output size
It was possible to set the encoder to scale the video to the same size
as the output, resulting in unnecessary passes through swscale and
skipping hardware encoders. This was a common user error in Advanced
Output mode where they would tick the rescale box but leave it at the
same resolution as their main output.
2023-03-04 15:14:42 -08:00
Richard Stanway 5b193bca55 libobs/util: Fix typo in curl revocation support check 2023-03-02 19:36:31 +01:00
Richard StanwayandRyan Foster e280fd6cd0 obs-ffmpeg: Add GeForce MX350 variant to unsupported NVENC list 2023-02-17 11:19:08 -05:00
Richard StanwayandRyan Foster 25f01357e6 obs-ffmpeg: Handle NV_ENC_ERR_NO_ENCODE_DEVICE error 2023-02-17 11:19:08 -05:00
Richard StanwayandRyan Foster 7dae8d307c obs-ffmpeg: Restore bad GPU index NVENC error message
FFmpeg wipes priv_data if the encoder fails to start, so we need some
way of knowing if the GPU index was non-zero. This is a bit ugly but the
best way to do it for now.
2023-02-17 11:19:08 -05:00
Richard StanwayandRyan Foster e593335086 obs-ffmpeg: NVENC error logging improvements
This writes the result of nvEncGetLastErrorString to the last encoder
error instead of just the log file. This makes it user-visible, which
should help users diagnose and solve the problem.

Also strips off leading colons from NVENC error strings as these can
look odd given our format string. An example of such an error:

::NV_ENC_TWO_PASS_FULL_RESOLUTION is only supported multipass encoding
on this architecture.
2023-02-17 11:19:08 -05:00
c57a291316 libobs: Convert security product name to UTF-8 for logging
Co-Authored-By: gkvjwa <285794886@qq.com>
2023-02-15 15:36:13 -05:00
Richard StanwayandRyan Foster 0121533e3e win-capture: Convert monitor name to UTF-8 for display
Also increase the buffer size to account for potential wide characters
consuming many bytes.
2023-02-15 15:36:13 -05:00
Richard StanwayandRyan Foster 150124038b libobs-d3d11: Convert monitor name to UTF-8 for logging 2023-02-15 15:36:13 -05:00
Richard StanwayandRyan Foster e9504326f9 UI: Remove unnecessary null checks 2023-02-15 13:40:13 -05:00
Richard StanwayandRyan Foster 2ac43052f9 UI: Fix memory leak of remux window 2023-02-15 13:40:13 -05:00
Richard StanwayandRyan Foster bff7928b50 UI: Avoid division by zero when calculating slider position
Detected by UBSan.
2023-02-15 13:40:13 -05:00
Richard StanwayandRyan Foster 1f278bb18b UI: Set remux entry state before adding to queue
When adding to the queue, this triggers rowCountChanged which then
calls canClearFinished, reading undefined memory for state if this is
not set. The correct state is set immediately after by checkInputPath.

Detected by UBSan.
2023-02-15 13:40:13 -05:00
Richard StanwayandRyan Foster 7178124da9 libobs: Fix typo in function name 2023-02-15 13:40:13 -05:00
Richard StanwayandRyan Foster 7c8acd48a9 UI: Improved implementation for sorting filters menu
Rather than finding the insertion point and iterating the vector for
each item, let's sort it afterwards.
2023-02-15 12:48:08 -05:00
c36583d794 obs-filters: Ensure gain is positive for upward compressor
The gain should be positive for an upward compressor. Initially, the
gain would be zeroe'd below -60 dB to ensure noise is not amplified by
the upward compressor. This created a discontinuity at -60 dB since
just above -60 dB, the audio is boosted by +20 dB (at default
settings). This was fixed in commit 50db097 which decreased smoothly
the gain so that it's 0 dB at -60 dB. However that commit forgot to
limit the gain decrease which was negative below -60 dB.
This is fixed by the current commit.
Additionally initialization allowed -inf gain. We hard limit to positive
gains only as they should be for an upward compressor.
The bugfix was found by R1ch and put in form by pkv.

Co-authored-by: pkv <pkv@obsproject.com>
Signed-off-by: pkv <pkv@obsproject.com>
2023-02-04 02:05:46 -08:00
Richard Stanway e9a401d898 UI: Remove unsupported Windows versions from manifest 2023-02-01 23:00:50 +01:00
Richard Stanway 668775f4f0 obs-ffmpeg: Use gai_strerrorA for error logging on Windows
Avoids wide characters in the format string which cause truncation.
2023-01-27 23:41:07 +01:00
Richard Stanway 062cfcf63d obs-filters: Fix wrong number of arguments to error macro 2023-01-27 23:21:41 +01:00
Richard StanwayandJim 9b1f7d6d21 virtualcam-module: Update filter size immediately when used in OBS
Fixes a crash due to the previous output size being used when scaling
the frame.
2023-01-27 13:03:22 -08:00
Richard StanwayandRyan Foster 5a4283816d obs-filters: Improve NVIDIA effects SDK version checks
- 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
2023-01-24 12:53:15 -05:00
Richard StanwayandJim bf00ef1ea3 obs-outputs: Improvements to Windows interface logging
Now uses GetIfEntry2 which supports 64-bit values for reporting speed, so
10+ gbps adapters are now reported correctly in the log. Also added an
additional log line if the interface error counters are non-zero to possibly
help identify physical faults. Finally the transmit and receive speeds are
logged independently so that asynchronous mediums such as Wi-Fi that might
have good RX but poor TX can be better diagnosed.
2023-01-14 15:48:43 -08:00
Richard StanwayandJim 930c65e7c3 UI: Prevent negative "disk full in" calculation when no output
If the output is paused the average bitrate will be zero, resulting in
infinite time until disk is full and int overflows. Similarly, if no data
has been collected yet, the result will be NaN and undefined behavior.
2023-01-07 15:49:13 -08:00
Richard StanwayandRodney b51773b97b rtmp-services: Specify RTMP_SERVICES_FORMAT_VERSION in package.json 2023-01-06 21:16:21 +01:00
Richard StanwayandJim 20d4bab77a win-capture: Always reset timeout when searching for target display
If the display wasn't found, the timer was not reset, causing the code
to execute on every single tick, stalling the graphics thread and using
excessive CPU.
2023-01-04 23:20:41 -08:00
Richard StanwayandRyan Foster 510f0116a6 cmake: Specify utf-8 for MSVC builds
If there is no BOM, MSVC defaults to the user's code page which can
result in errors if UTF-8 characters are present in the source files.
2022-11-20 17:38:23 -05:00
Richard StanwayandMatt Gajownik 02c6ce8b58 obs-vst: Improve some string handling
- Use constant references where appropriate
- Avoid unnecessary use of strcmp / strlen
- Clear std::string with clear()

Issues detected by PVS Studio.
2022-11-20 17:25:33 +11:00
Richard StanwayandMatt Gajownik fe9c3748ce obs-vst: Use libobs memory allocation functions 2022-11-20 17:25:33 +11:00
Richard Stanway 63c3299a9f obs-outputs: Increase librtmp send timeout to 15 seconds
Based on what we're seeing after the release of OBS 28, six seconds is
too low and causes disconnects instead of dropped frames.
2022-11-11 20:53:10 +01:00
Richard StanwayandJim 7e0ade0df0 UI: Remove support for toggling Aero
We no longer support Windows 7 and Aero (DWM composition) is
permanently enabled for all newer versions, so this code is obsolete.
2022-11-08 20:44:47 -08:00
Richard StanwayandJim da3a81a637 libobs: Remove Aero logging 2022-11-08 20:44:47 -08:00
Richard StanwayandJim c9c20008da UI: Fix always on top not being saved on exit
By the time we reach this part of the code it's too late to be checking
the window flags as the window has already been closed.
2022-11-05 11:06:39 -07:00
Richard StanwayandJim 2ad517e91e obs-filters: Remove unused assignments 2022-10-15 16:17:46 -07:00
Richard StanwayandJim 1d044db4f6 UI: Check return value of ConvertResText before accessing results 2022-10-15 16:17:46 -07:00
Richard StanwayandJim a282b1c64d libobs: Add ifdef for Windows-only variable assignment 2022-10-15 16:17:46 -07:00
Richard StanwayandJim cba81638b5 UI: Fix potential memory leak when parsing OBSThemeMeta 2022-10-15 16:17:46 -07:00
Richard StanwayandJim f021da2afa UI: Copy result of getenv before use
Another call to getenv, as well as a call to the POSIX functions
setenv(), unsetenv(), and putenv() may invalidate the pointer
returned by a previous call or modify the string obtained from a
previous call.

https://en.cppreference.com/w/c/program/getenv
2022-10-15 16:17:46 -07:00