diff --git a/ChangeLog b/ChangeLog index ceb6efa15d..6c4629abdf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-06-29 Tim-Philipp Müller + + * 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. + 2006-06-29 Tim-Philipp Müller * gst/id3demux/gstid3demux.c: (gst_id3demux_trim_buffer), diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index 15df1997ea..91556638f7 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 b9ba8ccdbf..cfc7b80d33 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 {