summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2006-06-29 11:41:55 +0000
committerTim-Philipp Müller <tim@centricular.net>2006-06-29 11:41:55 +0000
commit62487ce3b5b6e47396c7e02ff01dec0003311ca0 (patch)
tree8497d2c2db8967467e8b3221d6aee9427b67643a /gst
parent5aa89bdd337f4d619bd7ec16ca8d2d03ef6a564c (diff)
gst/matroska/: Send tag event after newsegment event.
Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream), (gst_matroska_demux_send_event), (gst_matroska_demux_loop_stream_parse_id): * gst/matroska/matroska-ids.h: Send tag event after newsegment event.
Diffstat (limited to 'gst')
-rw-r--r--gst/matroska/matroska-demux.c14
-rw-r--r--gst/matroska/matroska-ids.h3
2 files changed, 11 insertions, 6 deletions
diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
index 15df1997..91556638 100644
--- a/gst/matroska/matroska-demux.c
+++ b/gst/matroska/matroska-demux.c
@@ -945,16 +945,13 @@ gst_matroska_demux_add_stream (GstMatroskaDemux * demux)
GST_INFO_OBJECT (demux, "Adding pad '%s' with caps %" GST_PTR_FORMAT,
padname, caps);
+ context->pending_tags = list;
+
gst_pad_use_fixed_caps (context->pad);
gst_pad_set_caps (context->pad, context->caps);
gst_pad_set_active (context->pad, TRUE);
gst_element_add_pad (GST_ELEMENT (demux), context->pad);
- /* tags */
- if (list) {
- gst_element_found_tags_for_pad (GST_ELEMENT (demux), context->pad, list);
- }
-
g_free (padname);
/* tadaah! */
@@ -1088,6 +1085,12 @@ gst_matroska_demux_send_event (GstMatroskaDemux * demux, GstEvent * event)
stream = demux->src[i];
gst_event_ref (event);
gst_pad_push_event (stream->pad, event);
+
+ if (stream->pending_tags) {
+ gst_element_found_tags_for_pad (GST_ELEMENT (demux), stream->pad,
+ stream->pending_tags);
+ stream->pending_tags = NULL;
+ }
}
gst_event_unref (event);
return ret;
@@ -2870,7 +2873,6 @@ gst_matroska_demux_loop_stream_parse_id (GstMatroskaDemux * demux,
gst_event_new_new_segment (FALSE, 1.0,
GST_FORMAT_TIME, 0,
(demux->duration > 0) ? demux->duration : -1, 0));
-
GST_DEBUG_OBJECT (demux, "signaling no more pads");
gst_element_no_more_pads (GST_ELEMENT (demux));
} else {
diff --git a/gst/matroska/matroska-ids.h b/gst/matroska/matroska-ids.h
index b9ba8ccd..cfc7b80d 100644
--- a/gst/matroska/matroska-ids.h
+++ b/gst/matroska/matroska-ids.h
@@ -257,6 +257,9 @@ typedef struct _GstMatroskaTrackContext {
/* Special counter for muxer to skip the first N vorbis/theora headers -
* they are put into codec private data, not muxed into the stream */
guint xiph_headers_to_skip;
+
+ /* Tags to send after newsegment event */
+ GstTagList *pending_tags;
} GstMatroskaTrackContext;
typedef struct _GstMatroskaTrackVideoContext {