Skip to content
Snippets Groups Projects
Commit a1e7701e authored by Matthias Baesken's avatar Matthias Baesken
Browse files

8309756: Occasional crashes with pipewire screen capture on Wayland

Backport-of: d3d0dbc36369da0c17a66f8b633e73a150ab8c4f
parent 010a41fe
No related branches found
No related tags found
No related merge requests found
......@@ -89,8 +89,10 @@ static void doCleanup() {
struct ScreenProps *screenProps = &screenSpace.screens[i];
if (screenProps->data) {
if (screenProps->data->stream) {
fp_pw_thread_loop_lock(pw.loop);
fp_pw_stream_disconnect(screenProps->data->stream);
fp_pw_stream_destroy(screenProps->data->stream);
fp_pw_thread_loop_unlock(pw.loop);
screenProps->data->stream = NULL;
}
free(screenProps->data);
......@@ -892,8 +894,10 @@ JNIEXPORT jint JNICALL Java_sun_awt_screencast_ScreencastHelper_getRGBPixelsImpl
screenProps->captureData = NULL;
screenProps->shouldCapture = FALSE;
fp_pw_thread_loop_lock(pw.loop);
fp_pw_stream_set_active(screenProps->data->stream, FALSE);
fp_pw_stream_disconnect(screenProps->data->stream);
fp_pw_thread_loop_unlock(pw.loop);
}
}
doCleanup();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment