mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-18 04:05:34 +00:00
streams: update and emit notify signal only if taglist actually changed
https://bugzilla.gnome.org/show_bug.cgi?id=770161
This commit is contained in:
parent
b2f9808722
commit
a7a2623166
1 changed files with 11 additions and 3 deletions
|
@ -353,11 +353,19 @@ gst_stream_get_stream_type (GstStream * stream)
|
||||||
void
|
void
|
||||||
gst_stream_set_tags (GstStream * stream, GstTagList * tags)
|
gst_stream_set_tags (GstStream * stream, GstTagList * tags)
|
||||||
{
|
{
|
||||||
|
gboolean notify = FALSE;
|
||||||
|
|
||||||
GST_OBJECT_LOCK (stream);
|
GST_OBJECT_LOCK (stream);
|
||||||
gst_mini_object_replace ((GstMiniObject **) & stream->priv->tags,
|
if (stream->priv->tags == NULL || tags == NULL
|
||||||
(GstMiniObject *) tags);
|
|| !gst_tag_list_is_equal (stream->priv->tags, tags)) {
|
||||||
|
gst_mini_object_replace ((GstMiniObject **) & stream->priv->tags,
|
||||||
|
(GstMiniObject *) tags);
|
||||||
|
notify = TRUE;
|
||||||
|
}
|
||||||
GST_OBJECT_UNLOCK (stream);
|
GST_OBJECT_UNLOCK (stream);
|
||||||
g_object_notify_by_pspec (G_OBJECT (stream), gst_stream_pspecs[PROP_TAGS]);
|
|
||||||
|
if (notify)
|
||||||
|
g_object_notify_by_pspec (G_OBJECT (stream), gst_stream_pspecs[PROP_TAGS]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue