summaryrefslogtreecommitdiff
path: root/gst/matroska/matroska-demux.c
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2015-04-28 15:42:49 +0200
committerSebastian Dröge <sebastian@centricular.com>2015-04-28 15:42:49 +0200
commit9119fbd774093e3ae762c8652acd80d54b2c3b45 (patch)
tree786bd749ee36a7fcefa8335534db818d454aa8f2 /gst/matroska/matroska-demux.c
parent73c0c2920f9aca96982a4de0c20b3417aa148b81 (diff)
matroska-demux: Send pending tags when adding a new pad
We might've parsed those tags before already and tried to push them to non-existing pads before. Now let's do it for real.
Diffstat (limited to 'gst/matroska/matroska-demux.c')
-rw-r--r--gst/matroska/matroska-demux.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
index 0e49115c2..2cbc952e7 100644
--- a/gst/matroska/matroska-demux.c
+++ b/gst/matroska/matroska-demux.c
@@ -1240,6 +1240,29 @@ gst_matroska_demux_add_stream (GstMatroskaDemux * demux, GstEbmlRead * ebml)
gst_pad_push_event (context->pad, stream_start);
gst_pad_set_caps (context->pad, context->caps);
+
+ if (demux->common.global_tags) {
+ GstEvent *tag_event;
+
+ gst_tag_list_add (demux->common.global_tags, GST_TAG_MERGE_REPLACE,
+ GST_TAG_CONTAINER_FORMAT, "Matroska", NULL);
+ GST_DEBUG_OBJECT (context->pad, "Sending global_tags %p: %" GST_PTR_FORMAT,
+ demux->common.global_tags, demux->common.global_tags);
+
+ tag_event =
+ gst_event_new_tag (gst_tag_list_copy (demux->common.global_tags));
+
+ gst_pad_push_event (context->pad, tag_event);
+ }
+
+ if (G_UNLIKELY (context->tags_changed)) {
+ GST_DEBUG_OBJECT (context->pad, "Sending tags %p: %"
+ GST_PTR_FORMAT, context->tags, context->tags);
+ gst_pad_push_event (context->pad,
+ gst_event_new_tag (gst_tag_list_copy (context->tags)));
+ context->tags_changed = FALSE;
+ }
+
gst_element_add_pad (GST_ELEMENT (demux), context->pad);
gst_flow_combiner_add_pad (demux->flowcombiner, context->pad);