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:
Hoonhee Lee 2016-08-20 08:54:27 +09:00 committed by Tim-Philipp Müller
parent b2f9808722
commit a7a2623166

View file

@ -353,10 +353,18 @@ gst_stream_get_stream_type (GstStream * stream)
void
gst_stream_set_tags (GstStream * stream, GstTagList * tags)
{
gboolean notify = FALSE;
GST_OBJECT_LOCK (stream);
if (stream->priv->tags == NULL || tags == NULL
|| !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);
if (notify)
g_object_notify_by_pspec (G_OBJECT (stream), gst_stream_pspecs[PROP_TAGS]);
}