summaryrefslogtreecommitdiffstats
path: root/src/wth-receiver-gst-shm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wth-receiver-gst-shm.c')
-rw-r--r--src/wth-receiver-gst-shm.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/wth-receiver-gst-shm.c b/src/wth-receiver-gst-shm.c
index 2228d4f..50efe0b 100644
--- a/src/wth-receiver-gst-shm.c
+++ b/src/wth-receiver-gst-shm.c
@@ -815,7 +815,7 @@ wth_receiver_weston_main(struct window *window, const char *app_id, int port)
memset(pipeline, 0x00, sizeof(pipeline));
snprintf(pipeline, sizeof(pipeline), pipe, port);
- fprintf(stdout, "pipeline %s\n", pipeline);
+ fprintf(stdout, "Using pipeline %s\n", pipeline);
/* parse the pipeline */
gstctx.pipeline = gst_parse_launch(pipeline, &gerror);
@@ -836,7 +836,6 @@ wth_receiver_weston_main(struct window *window, const char *app_id, int port)
while (running && ret != -1)
ret = wl_display_dispatch(gstctx.display->display);
-
gst_element_set_state(gstctx.pipeline, GST_STATE_NULL);
gst_object_unref(gstctx.pipeline);
@@ -844,5 +843,10 @@ wth_receiver_weston_main(struct window *window, const char *app_id, int port)
destroy_display(gstctx.display);
free(gargv);
- return 0;
+ fprintf(stdout, "Exiting, closed down gstreamer pipeline\n");
+ /* note, we do a exit here because wth_receiver_weston_main() isn't
+ * really C's main() and we fork() before calling this. Doing a return
+ * will not correctly signal the parent that the child process exited
+ */
+ exit(EXIT_SUCCESS);
}