ec3e8146b2
The gs_draw_sprite_subregion() function is used when a cropping rectangle is received from PipeWire. It is usually used by compositors to implement window screencast - where a large and mostly empty frame is sent, the window contents are only a small part of it, and the crop rectangle tells us that. Recently the wlroots implementation of portals started to use it to implement cropping, and it exposed a bug in the PipeWire code in OBS Studio. The gs_draw_sprite_subregion() function takes a pair of integers representing position (x, y) and a pair of integers representing size (width, height). The PipeWire code, however, passes a second pair of positions (x2, y2) instead of sizes, and it causes overrendering the crop area. This bug wasn't hit yet because both GNOME and KDE implementations always send (0, 0) as position, which practically never trigger this condition. Pass only width and height to gs_draw_sprite_subregion(), instead of adding x and y to them. Fixes https://github.com/obsproject/obs-studio/issues/4982 |
||
---|---|---|
.. | ||
data/locale | ||
CMakeLists.txt | ||
README | ||
linux-capture.c | ||
pipewire-capture.c | ||
pipewire-capture.h | ||
pipewire.c | ||
pipewire.h | ||
portal.c | ||
portal.h | ||
xcompcap-helper.cpp | ||
xcompcap-helper.hpp | ||
xcompcap-main.cpp | ||
xcompcap-main.hpp | ||
xcomposite-main.cpp | ||
xcursor-xcb.c | ||
xcursor-xcb.h | ||
xcursor.c | ||
xcursor.h | ||
xhelpers.c | ||
xhelpers.h | ||
xshm-input.c |
README
Linux XShm capture plugin This plugin uses the MIT-SHM extension for the X-server to capture the desktop. Todo: - handle resolution changes of screens - handle adding/removing screens while recording - support different depths Contributing: If you are interested in helping out with the plugin, please drop by in the #obs-dev channel on quakenet. References: - http://www.x.org/releases/current/doc/xextproto/shm.html