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.
This commit is contained in:
Jan Schmidt 2010-08-04 21:44:22 +10:00
parent f9404c0b27
commit 1f454b76cf

View file

@ -2402,9 +2402,10 @@ static void
msg_clock_lost (GstBus * bus, GstMessage * message, GstPipeline * data) msg_clock_lost (GstBus * bus, GstMessage * message, GstPipeline * data)
{ {
g_print ("clock lost! PAUSE and PLAY to select a new clock\n"); g_print ("clock lost! PAUSE and PLAY to select a new clock\n");
if (state == GST_STATE_PLAYING) {
gst_element_set_state (pipeline, GST_STATE_PAUSED); gst_element_set_state (pipeline, GST_STATE_PAUSED);
gst_element_set_state (pipeline, GST_STATE_PLAYING); gst_element_set_state (pipeline, GST_STATE_PLAYING);
}
} }
#ifdef HAVE_X #ifdef HAVE_X