summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRamiro Polla <ramiro.polla@collabora.co.uk>2015-03-15 14:40:36 +0100
committerThiago Santos <thiagoss@osg.samsung.com>2015-03-28 10:24:57 -0300
commit7b2b619a8f9a9329a979dd7d96a339a8740c57d0 (patch)
treeb81530a3058bda89dd8f852cac352b6eae0e0919
parentaf4502103678fd3775afbadb4cda88956e2bccce (diff)
matroskademux: send global tags incrementally
Instead of sending only new tags once they are found, merge the taglist and send them incrementally.
-rw-r--r--gst/matroska/matroska-demux.c7
1 files 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);