summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2009-04-10 14:15:36 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2009-04-10 14:15:36 +0200
commitcf78781c6bd030c3f39a3a49101b4a738e2a68e8 (patch)
treede0b1bc2cadd613b663aaed86272172e0ef5f13e
parent376bed78ced70922dc9f9886a25b751765fca337 (diff)
-launch: handle clock-lost messages
When we receive a clock-lost message, we need to select a new clock in the pipeline by setting the pipeline to PAUSED and back to PLAYING.
-rw-r--r--tools/gst-launch.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/gst-launch.c b/tools/gst-launch.c
index ec38eb1f0c..fceebf2feb 100644
--- a/tools/gst-launch.c
+++ b/tools/gst-launch.c
@@ -438,6 +438,11 @@ event_loop (GstElement * pipeline, gboolean blocking, GstState target_state)
g_print ("New clock: %s\n", (clock ? GST_OBJECT_NAME (clock) : "NULL"));
break;
}
+ case GST_MESSAGE_CLOCK_LOST:
+ g_print ("Clock lost, selecting a new one\n");
+ gst_element_set_state (pipeline, GST_STATE_PAUSED);
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
+ break;
case GST_MESSAGE_EOS:
waiting_eos = FALSE;
g_print (_