diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2018-10-24 14:34:13 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2018-10-24 14:36:41 +0100 |
commit | afbbc3a97ec391c6a582f3c746965fdc3eb3e1f3 (patch) | |
tree | 2c8899b9fc484742cc2f17f37cef67f4d7e463c9 /gst-libs | |
parent | 4a24739a14c126b33ebf1e08b6ea3ae2e605178f (diff) | |
download | gstreamer-plugins-bad-afbbc3a97ec391c6a582f3c746965fdc3eb3e1f3.tar.gz |
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
Diffstat (limited to 'gst-libs')
-rw-r--r-- | gst-libs/gst/player/gstplayer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gst-libs/gst/player/gstplayer.c b/gst-libs/gst/player/gstplayer.c index e45c1af2d..651d2a57c 100644 --- a/gst-libs/gst/player/gstplayer.c +++ b/gst-libs/gst/player/gstplayer.c @@ -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); |