mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-11-25 23:45:58 +01:00
Fix freeze on skipped frame
When a frame is skipped, we weren't destroying the wlr frame. Since this function kicks off the next frame capture, the stream was getting stuck. Closes: https://github.com/emersion/xdg-desktop-portal-wlr/issues/81
This commit is contained in:
parent
5b646c0482
commit
9f72a6d874
1 changed files with 3 additions and 2 deletions
|
@ -38,14 +38,14 @@ static void pwr_on_event(void *data, uint64_t expirations) {
|
|||
|
||||
if ((pw_buf = pw_stream_dequeue_buffer(cast->stream)) == NULL) {
|
||||
logprint(WARN, "pipewire: out of buffers");
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
|
||||
spa_buf = pw_buf->buffer;
|
||||
d = spa_buf->datas;
|
||||
if ((d[0].data) == NULL) {
|
||||
logprint(TRACE, "pipewire: data pointer undefined");
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
if ((h = spa_buffer_find_meta_data(spa_buf, SPA_META_Header, sizeof(*h)))) {
|
||||
h->pts = -1;
|
||||
|
@ -76,6 +76,7 @@ static void pwr_on_event(void *data, uint64_t expirations) {
|
|||
|
||||
pw_stream_queue_buffer(cast->stream, pw_buf);
|
||||
|
||||
out:
|
||||
xdpw_wlr_frame_free(cast);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue