mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 22:10:08 +00:00
mediastream: Allow multiple calls to gtk_media_stream_error()
Just ignore all further ones.
This commit is contained in:
parent
c30968861f
commit
89c48a08a0
@ -1120,6 +1120,10 @@ gtk_media_stream_unprepared (GtkMediaStream *self)
|
||||
* your GtkMediaStream.pause() implementation), abort pending seeks
|
||||
* and mark the stream as prepared.
|
||||
*
|
||||
* if the stream is already in an error state, this call will be ignored
|
||||
* and the existing error will be retained.
|
||||
* FIXME: Or do we want to set the new error?
|
||||
*
|
||||
* To unset an error, the stream must be reset via a call to
|
||||
* gtk_media_stream_unprepared().
|
||||
**/
|
||||
@ -1130,9 +1134,11 @@ gtk_media_stream_gerror (GtkMediaStream *self,
|
||||
GtkMediaStreamPrivate *priv = gtk_media_stream_get_instance_private (self);
|
||||
|
||||
g_return_if_fail (GTK_IS_MEDIA_STREAM (self));
|
||||
g_return_if_fail (gtk_media_stream_get_error (self) == NULL);
|
||||
g_return_if_fail (error != NULL);
|
||||
|
||||
if (priv->error)
|
||||
return;
|
||||
|
||||
g_object_freeze_notify (G_OBJECT (self));
|
||||
|
||||
priv->error = error;
|
||||
|
Loading…
Reference in New Issue
Block a user