mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 20:05:38 +00:00
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
1 changed files with 2 additions and 1 deletions
|
@ -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…
Reference in a new issue