Commit 2f2e3676 authored by Wim Taymans's avatar Wim Taymans

playback-test: wait for buffering after seek

Wait for buffering to finish before setting the element to the playing state
after a seek.
parent 0fa50b44
......@@ -558,8 +558,12 @@ seek_cb (GtkRange * range, PlaybackApp * app)
do_seek (app, GST_FORMAT_TIME, real);
if (app->play_scrub) {
GST_DEBUG ("do scrub seek, PLAYING");
gst_element_set_state (app->pipeline, GST_STATE_PLAYING);
if (app->buffering) {
GST_DEBUG ("do scrub seek, waiting for buffering");
} else {
GST_DEBUG ("do scrub seek, PLAYING");
gst_element_set_state (app->pipeline, GST_STATE_PLAYING);
}
if (app->seek_timeout_id == 0) {
app->seek_timeout_id =
......@@ -673,8 +677,12 @@ stop_seek (GtkRange * range, GdkEventButton * event, PlaybackApp * app)
}
} else {
if (app->state == GST_STATE_PLAYING) {
GST_DEBUG ("stop scrub seek, PLAYING");
gst_element_set_state (app->pipeline, GST_STATE_PLAYING);
if (app->buffering) {
GST_DEBUG ("stop scrub seek, waiting for buffering");
} else {
GST_DEBUG ("stop scrub seek, PLAYING");
gst_element_set_state (app->pipeline, GST_STATE_PLAYING);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment