ffmpegdemux: post tags after the initial newsegment event

This commit is contained in:
Tim-Philipp Müller 2009-06-30 02:11:14 +01:00
parent 793e25cfc7
commit 048b0145a8

View file

@ -1162,13 +1162,6 @@ gst_ffmpegdemux_open (GstFFMpegDemux * demux)
gst_element_no_more_pads (GST_ELEMENT (demux)); gst_element_no_more_pads (GST_ELEMENT (demux));
/* grab the tags */
tags = gst_ffmpegdemux_read_tags (demux);
if (tags) {
gst_element_post_message (GST_ELEMENT (demux),
gst_message_new_tag (GST_OBJECT (demux), tags));
}
/* transform some useful info to GstClockTime and remember */ /* transform some useful info to GstClockTime and remember */
demux->start_time = gst_util_uint64_scale_int (demux->context->start_time, demux->start_time = gst_util_uint64_scale_int (demux->context->start_time,
GST_SECOND, AV_TIME_BASE); GST_SECOND, AV_TIME_BASE);
@ -1202,6 +1195,13 @@ gst_ffmpegdemux_open (GstFFMpegDemux * demux)
demux->segment.start, demux->segment.stop, demux->segment.time)); demux->segment.start, demux->segment.stop, demux->segment.time));
} }
/* grab the tags */
tags = gst_ffmpegdemux_read_tags (demux);
if (tags) {
gst_element_post_message (GST_ELEMENT (demux),
gst_message_new_tag (GST_OBJECT (demux), tags));
}
return TRUE; return TRUE;
/* ERRORS */ /* ERRORS */