From 1f454b76cfc8968cced4be646b66823d5304970e Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Wed, 4 Aug 2010 21:44:22 +1000 Subject: [PATCH] examples/seek: Don't unpause on clock-lost unless playing If the pipeline is paused by the user, don't pause/unpause on clock-lost. --- tests/examples/seek/seek.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/examples/seek/seek.c b/tests/examples/seek/seek.c index 1d6bdca2b3..8c231cd8e2 100644 --- a/tests/examples/seek/seek.c +++ b/tests/examples/seek/seek.c @@ -2402,9 +2402,10 @@ static void msg_clock_lost (GstBus * bus, GstMessage * message, GstPipeline * data) { g_print ("clock lost! PAUSE and PLAY to select a new clock\n"); - - gst_element_set_state (pipeline, GST_STATE_PAUSED); - gst_element_set_state (pipeline, GST_STATE_PLAYING); + if (state == GST_STATE_PLAYING) { + gst_element_set_state (pipeline, GST_STATE_PAUSED); + gst_element_set_state (pipeline, GST_STATE_PLAYING); + } } #ifdef HAVE_X