summaryrefslogtreecommitdiff
path: root/plugins/elements/gstinputselector.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/elements/gstinputselector.c')
-rw-r--r--plugins/elements/gstinputselector.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/elements/gstinputselector.c b/plugins/elements/gstinputselector.c
index c2552e70..a0ed632 100644
--- a/plugins/elements/gstinputselector.c
+++ b/plugins/elements/gstinputselector.c
@@ -451,12 +451,13 @@ gst_selector_pad_iterate_linked_pads (GstPad * pad, GstObject * parent)
static gboolean
gst_selector_pad_event (GstPad * pad, GstObject * parent, GstEvent * event)
{
gboolean res = TRUE;
gboolean forward;
+ gboolean new_tags = FALSE;
GstInputSelector *sel;
GstSelectorPad *selpad;
GstPad *prev_active_sinkpad;
GstPad *active_sinkpad;
sel = GST_INPUT_SELECTOR (parent);
@@ -521,13 +522,13 @@ gst_selector_pad_event (GstPad * pad, GstObject * parent, GstEvent * event)
newtags = gst_tag_list_merge (oldtags, tags, GST_TAG_MERGE_REPLACE);
selpad->tags = newtags;
if (oldtags)
gst_tag_list_unref (oldtags);
GST_DEBUG_OBJECT (pad, "received tags %" GST_PTR_FORMAT, newtags);
- g_object_notify (G_OBJECT (selpad), "tags");
+ new_tags = TRUE;
break;
}
case GST_EVENT_EOS:
selpad->eos = TRUE;
if (forward) {
@@ -548,12 +549,14 @@ gst_selector_pad_event (GstPad * pad, GstObject * parent, GstEvent * event)
GST_DEBUG_OBJECT (pad, "received EOS");
break;
default:
break;
}
GST_INPUT_SELECTOR_UNLOCK (sel);
+ if (new_tags)
+ g_object_notify (G_OBJECT (selpad), "tags");
if (forward) {
GST_DEBUG_OBJECT (pad, "forwarding event");
res = gst_pad_push_event (sel->srcpad, event);
} else {
/* If we aren't forwarding the event because the pad is not the
* active_sinkpad, then set the flag on the pad