Commit 9119fbd7 authored by Sebastian Dröge's avatar Sebastian Dröge
Browse files

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.
parent 73c0c292
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment