diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-01-02 00:06:41 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-01-02 01:33:48 -0500 |
commit | 0ba56311004728c19e52831778c982e89a7a7278 (patch) | |
tree | 992626aa7f39538c4752ee2b71926ce6e54ad77e | |
parent | c72589f0ee870995037cd91424efe325aa46027d (diff) | |
download | gtk+-0ba56311004728c19e52831778c982e89a7a7278.tar.gz |
video: Pause on unset too
When new media stream is set on the GtkVideo
widget and we're autoplaying, pause the old one.
Otherwise, the music keeps playing unexpectedly.
-rw-r--r-- | gtk/gtkvideo.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gtk/gtkvideo.c b/gtk/gtkvideo.c index 7eee5fd5ba..8258e25145 100644 --- a/gtk/gtkvideo.c +++ b/gtk/gtkvideo.c @@ -593,6 +593,8 @@ gtk_video_set_media_stream (GtkVideo *self, if (self->media_stream) { + if (self->autoplay) + gtk_media_stream_pause (self->media_stream); g_signal_handlers_disconnect_by_func (self->media_stream, gtk_video_notify_cb, self); |