From 7b2b619a8f9a9329a979dd7d96a339a8740c57d0 Mon Sep 17 00:00:00 2001 From: Ramiro Polla Date: Sun, 15 Mar 2015 14:40:36 +0100 Subject: matroskademux: send global tags incrementally Instead of sending only new tags once they are found, merge the taglist and send them incrementally. --- gst/matroska/matroska-demux.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index 251adfff6..1e35f0315 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -1424,14 +1424,15 @@ gst_matroska_demux_send_tags (GstMatroskaDemux * demux) { gint i; - if (G_UNLIKELY (demux->common.global_tags != NULL)) { + if (G_UNLIKELY (demux->common.global_tags_changed)) { GstEvent *tag_event; gst_tag_list_add (demux->common.global_tags, GST_TAG_MERGE_REPLACE, GST_TAG_CONTAINER_FORMAT, "Matroska", NULL); GST_DEBUG_OBJECT (demux, "Sending global_tags %p : %" GST_PTR_FORMAT, demux->common.global_tags, demux->common.global_tags); - tag_event = gst_event_new_tag (demux->common.global_tags); + tag_event = + gst_event_new_tag (gst_tag_list_copy (demux->common.global_tags)); for (i = 0; i < demux->common.src->len; i++) { GstMatroskaTrackContext *stream; @@ -1441,7 +1442,7 @@ gst_matroska_demux_send_tags (GstMatroskaDemux * demux) } gst_event_unref (tag_event); - demux->common.global_tags = NULL; + demux->common.global_tags_changed = FALSE; } g_assert (demux->common.src->len == demux->common.num_streams); -- cgit v1.2.3