Commit Graph

10 Commits

Author SHA1 Message Date
Rob Howell
2b613f40b4 media-playback: Fix null pointer dereference 2025-08-04 15:39:26 -04:00
jeiea
22c4e11ec8 media-playback: Fix possible crash on startup
Frame width/height check crash if the frame is not given.

We can reorder width/height check after other precondition checks.
2025-05-06 14:27:29 -04:00
Ryan Foster
7cae57d3b7 media-playback: Fix possible crash if frame width or height is zero
If a frame has a width or height of zero, this value will make it into
libobs/media-io/video-frame.c:video_frame_init and cause linesizes or
heights to be zero, which will result in a bmalloc(0) call and OBS will
crash.

Instead of letting the call stack get that far, check the frame width
and height here at the source, log an error, and return early if the
frame width or height are zero.
2025-04-23 19:26:54 -04:00
Ryan Foster
a1fbf1015f clang-format: Increase column limit from 80 to 120 2024-10-04 18:19:27 -04:00
PatTheMav
6c590805e8 cmake: Update supported CMake version range to 3.28 and 3.30 2024-09-13 14:42:32 -04:00
tytan652
72428ccd97 Remove CMake legacy code path
Except submodules and legacy_check macro since the former depend on it.
2024-08-28 13:53:25 -04:00
derrod
d9503d4c27 shared/media-playback: Remove compatibility with FFmpeg < 6.1 2024-08-23 13:44:04 -04:00
PatTheMav
b8cfacaec3 Update formatting of CMake files 2024-08-14 12:07:47 -04:00
tt2468
7b2a6351b0 shared/media-playback: Unref sw_frame before reuse
By not performing an unref on sw_frame before using it again, a memory
"leak" was being created if the frame had side data. This removes a
previously-added check that optionally unrefs sw_frame, and just does
it every tick.

Co-authored-by: pkviet <pkv@obsproject.com>
2024-08-03 16:31:02 -07:00
tytan652
ade04f4f1c deps,shared,obs-ffmpeg: Move media-playback to shared folder 2024-07-27 07:38:36 +02:00