diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2018-10-24 14:34:13 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2018-11-05 20:15:38 +0200 |
commit | 5335a36086b348d8b90c2b1da7780ecef958f6d8 (patch) | |
tree | 873b7d5d188a4c6885cfe4aa4ef3148090e650e1 | |
parent | 566e4ecc223b18fce8bd932f5e4885f41f746dd4 (diff) | |
download | gstreamer-plugins-bad-5335a36086b348d8b90c2b1da7780ecef958f6d8.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
-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); |