player: Don't change state to PLAYING immediately if a seek is pending

We first have to finish the seek (in PAUSED) and move to PLAYING once
the seek is actually finished (unless a new one is pending then).
This commit is contained in:
Sebastian Dröge 2016-09-14 18:07:55 +02:00
parent 3f44aea2e1
commit a036b7ef9f

View file

@ -2766,7 +2766,8 @@ gst_player_play_internal (gpointer user_data)
change_state (self, GST_PLAYER_STATE_BUFFERING);
if (self->current_state >= GST_STATE_PAUSED && !self->is_eos
&& self->buffering >= 100) {
&& self->buffering >= 100 && !(self->seek_position != GST_CLOCK_TIME_NONE
|| self->seek_pending)) {
state_ret = gst_element_set_state (self->playbin, GST_STATE_PLAYING);
} else {
state_ret = gst_element_set_state (self->playbin, GST_STATE_PAUSED);