mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-11-22 14:35:57 +01:00
screencast: enqueue pipewire when screencopy failed
Keeping a buffer when the copy failed has the risk of having this buffer removed while we wait for the next buffer_done event. To prevent this we just enqueue the buffer marking it as corrupt. A new buffer will be dequeued at the buffer_done event.
This commit is contained in:
parent
2f32d17448
commit
5799adeb57
1 changed files with 4 additions and 0 deletions
|
@ -50,6 +50,10 @@ void xdpw_wlr_frame_finish(struct xdpw_screencast_instance *cast) {
|
|||
pwr_update_stream_param(cast);
|
||||
}
|
||||
|
||||
if (cast->frame_state == XDPW_FRAME_STATE_FAILED) {
|
||||
xdpw_pwr_enqueue_buffer(cast);
|
||||
}
|
||||
|
||||
if (cast->frame_state == XDPW_FRAME_STATE_SUCCESS) {
|
||||
xdpw_pwr_enqueue_buffer(cast);
|
||||
uint64_t delay_ns = fps_limit_measure_end(&cast->fps_limit, cast->framerate);
|
||||
|
|
Loading…
Reference in a new issue