player: Don't set state to READY if we're already stopped

Otherwise setting an URI after creation will already set the state
to READY/buffering and disallow setting the configuration.

See https://github.com/servo/servo/issues/22010
This commit is contained in:
Sebastian Dröge 2018-10-24 14:34:13 +01:00
parent 4a24739a14
commit afbbc3a97e

View file

@ -3198,6 +3198,11 @@ gst_player_pause (GstPlayer * self)
static void
gst_player_stop_internal (GstPlayer * self, gboolean transient)
{
/* directly return if we're already stopped */
if (self->current_state <= GST_STATE_READY &&
self->target_state <= GST_STATE_READY)
return;
GST_DEBUG_OBJECT (self, "Stop (transient %d)", transient);
tick_cb (self);