summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 47d9904)
raw | patch | inline | side by side (parent: 47d9904)
author | David Schleef <ds@schleef.org> | |
Tue, 2 Jun 2009 20:45:52 +0000 (13:45 -0700) | ||
committer | David Schleef <ds@schleef.org> | |
Tue, 2 Jun 2009 20:49:36 +0000 (13:49 -0700) |
When it is shutting down a pipeline after ctrl-c, set pipeline to
paused before waiting for the main loop to complete all pending
transactions. Fixes #584657.
If some part of the pipeline is generating signals or idle functions
at a fast rate, waiting for a main loop iteration may never return.
paused before waiting for the main loop to complete all pending
transactions. Fixes #584657.
If some part of the pipeline is generating signals or idle functions
at a fast rate, waiting for a main loop iteration may never return.
tools/gst-launch.c | patch | blob | history |
diff --git a/tools/gst-launch.c b/tools/gst-launch.c
index 3e69d21b59a08aaf8521cb5821e00561b7df08fa..9af4f0499a05c07cf449725420534c9679e7a7a9 100644 (file)
--- a/tools/gst-launch.c
+++ b/tools/gst-launch.c
g_print (_("Execution ended after %" G_GUINT64_FORMAT " ns.\n"), diff);
}
- /* iterate mainloop to process pending stuff */
- while (g_main_context_iteration (NULL, FALSE));
-
PRINT (_("Setting pipeline to PAUSED ...\n"));
gst_element_set_state (pipeline, GST_STATE_PAUSED);
if (caught_error == ELR_NO_ERROR)
gst_element_get_state (pipeline, &state, &pending, GST_CLOCK_TIME_NONE);
+
+ /* iterate mainloop to process pending stuff */
+ while (g_main_context_iteration (NULL, FALSE));
+
PRINT (_("Setting pipeline to READY ...\n"));
gst_element_set_state (pipeline, GST_STATE_READY);
gst_element_get_state (pipeline, &state, &pending, GST_CLOCK_TIME_NONE);