Compare commits

...

1 Commits

Author SHA1 Message Date
Niels De Graef
add83a9a7d video: Always pause if media-stream changed
When you have a `GtkVideo` that's already playing some file, then
using `gtk_video_set_file()` (or `gtk_video_set_media_stream()`) will
_not_ pause the old media stream if "autoplay" is not set.

What happens, is that you then get a `GtkVideo` which is playing both
sound from the old stream, as well as video and sound from the new one,
which is quite confusing.

when setting a new media-stream, we should just _always_ put the
previous one to paused to prevent any confusion.
2021-11-16 16:28:32 +01:00

View File

@@ -615,8 +615,7 @@ gtk_video_set_media_stream (GtkVideo *self,
if (self->media_stream)
{
if (self->autoplay)
gtk_media_stream_pause (self->media_stream);
gtk_media_stream_pause (self->media_stream);
g_signal_handlers_disconnect_by_func (self->media_stream,
gtk_video_notify_cb,
self);