return result;
}
+static void
+qtdemux_post_global_tags (GstQTDemux * qtdemux)
+{
+ /* all header tags ready and parsed, push them */
+ GST_INFO_OBJECT (qtdemux, "posting global tags: %" GST_PTR_FORMAT,
+ qtdemux->tag_list);
+ /* post now, send event on pads later */
+ gst_element_post_message (GST_ELEMENT (qtdemux),
+ gst_message_new_tag (GST_OBJECT (qtdemux),
+ gst_tag_list_copy (qtdemux->tag_list)));
+}
+
static void
qtdemux_parse_ftyp (GstQTDemux * qtdemux, const guint8 * buffer, gint length)
{
beach:
if (ret == GST_FLOW_UNEXPECTED && qtdemux->got_moov) {
- /* all header tags ready and parsed, push them */
- GST_INFO_OBJECT (qtdemux, "posting global tags: %" GST_PTR_FORMAT,
- qtdemux->tag_list);
- /* post now, send event on pads later */
- gst_element_post_message (GST_ELEMENT (qtdemux),
- gst_message_new_tag (GST_OBJECT (qtdemux),
- gst_tag_list_copy (qtdemux->tag_list)));
+ /* Only post, event on pads is done after newsegment */
+ qtdemux_post_global_tags (qtdemux);
qtdemux->state = QTDEMUX_STATE_MOVIE;
GST_DEBUG_OBJECT (qtdemux, "switching state to STATE_MOVIE (%d)",
/* we have the headers, start playback */
demux->state = QTDEMUX_STATE_MOVIE;
demux->neededbytes = next_entry_size (demux);
+
+ /* Only post, event on pads is done after newsegment */
+ qtdemux_post_global_tags (demux);
+
} else {
/* no headers yet, try to get them */
guint bs;
} else if (fourcc == FOURCC_ftyp) {
GST_DEBUG_OBJECT (demux, "Parsing [ftyp]");
qtdemux_parse_ftyp (demux, data, demux->neededbytes);
+ } else if (fourcc == FOURCC_uuid) {
+ GST_DEBUG_OBJECT (demux, "Parsing [uuid]");
+ qtdemux_parse_uuid (demux, data, demux->neededbytes);
} else {
GST_WARNING_OBJECT (demux,
"Unknown fourcc while parsing header : %" GST_FOURCC_FORMAT,
demux->neededbytes = next_entry_size (demux);
demux->state = QTDEMUX_STATE_MOVIE;
- GST_INFO_OBJECT (demux, "posting global tags: %" GST_PTR_FORMAT,
- demux->tag_list);
- /* post now, send event on pads later */
- gst_element_post_message (GST_ELEMENT (demux),
- gst_message_new_tag (GST_OBJECT (demux),
- gst_tag_list_copy (demux->tag_list)));
+ /* Only post, event on pads is done after newsegment */
+ qtdemux_post_global_tags (demux);
} else {
GST_DEBUG_OBJECT (demux, "Carrying on normally");