player: Only set the pipeline to PLAYING in play() if buffering>=100%
Otherwise the application can break the buffering logic by setting the pipeline to PLAYING before we buffered enough.
This commit is contained in:
parent
fce10c44ae
commit
7f8d9d1df2
@ -2546,7 +2546,8 @@ gst_player_play_internal (gpointer user_data)
|
||||
if (self->current_state < GST_STATE_PAUSED)
|
||||
change_state (self, GST_PLAYER_STATE_BUFFERING);
|
||||
|
||||
if (self->current_state >= GST_STATE_PAUSED && !self->is_eos) {
|
||||
if (self->current_state >= GST_STATE_PAUSED && !self->is_eos
|
||||
&& self->buffering >= 100) {
|
||||
state_ret = gst_element_set_state (self->playbin, GST_STATE_PLAYING);
|
||||
} else {
|
||||
state_ret = gst_element_set_state (self->playbin, GST_STATE_PAUSED);
|
||||
|
Loading…
x
Reference in New Issue
Block a user