I just noticed that exec_after doesn't get executed when closing a stream (at least in Firefox). I found this patch fixes the issue:
diff --git a/src/screencast/wlr_screencast.c b/src/screencast/wlr_screencast.c
index 9760736..d76344f 100644
--- a/src/screencast/wlr_screencast.c
+++ b/src/screencast/wlr_screencast.c
@@ -32,9 +32,9 @@ void xdpw_wlr_frame_finish(struct xdpw_screencast_instance *cast) {
wlr_frame_free(cast);
- if (!cast->pwr_stream_state) {
+ /*if (!cast->pwr_stream_state) {
return;
- }
+ }*/
// Check if we have a buffer
if (cast->current_frame.current_pw_buffer) {
The issue seems to be that due to the early return xdpw_screencast_instance_destroy doesn't get called. Not sure whether removing it has any side effects that's why I didn't just open a PR for it. It didn't cause any obvious issues to me at least.
I just noticed that exec_after doesn't get executed when closing a stream (at least in Firefox). I found this patch fixes the issue:
The issue seems to be that due to the early return xdpw_screencast_instance_destroy doesn't get called. Not sure whether removing it has any side effects that's why I didn't just open a PR for it. It didn't cause any obvious issues to me at least.