Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
upon start: wait (best effort) for the SHM socket to appear befiore t…
Browse files Browse the repository at this point in the history
…rying to read from it.
  • Loading branch information
fzwoch committed Feb 6, 2018
1 parent ba5d452 commit fa19b26
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions gnome-screencast.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,16 @@ static void start(data_t* data)

data->frame_count = 0;

for (gint i = 0; i < 100; i++)
{
if (g_file_test(obs_data_get_string(data->settings, "shm_socket"), G_FILE_TEST_EXISTS) == TRUE)
{
break;
}

g_usleep(10000);
}

gst_element_set_state(data->pipe, GST_STATE_PLAYING);
}

Expand Down

0 comments on commit fa19b26

Please sign in to comment.