matroskademux: Send stream headers after the segment event

https://bugzilla.gnome.org/show_bug.cgi?id=700799
This commit is contained in:
Sebastian Dröge 2013-06-11 13:54:53 +02:00
parent adc9f0bd10
commit e2b46a776f

View file

@ -3238,23 +3238,6 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux,
break; break;
} }
if (stream->send_stream_headers) {
if (stream->stream_headers != NULL) {
ret = gst_matroska_demux_push_stream_headers (demux, stream);
} else {
/* FIXME: perhaps we can just disable and skip this stream then */
GST_ELEMENT_ERROR (demux, STREAM, DECODE, (NULL),
("Failed to extract stream headers from codec private data"));
}
stream->send_stream_headers = FALSE;
}
if (stream->send_dvd_event) {
gst_matroska_demux_push_dvd_clut_change_event (demux, stream);
/* FIXME: should we send this event again after (flushing) seek ? */
stream->send_dvd_event = FALSE;
}
if (ret != GST_FLOW_OK) if (ret != GST_FLOW_OK)
break; break;
@ -3391,6 +3374,23 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux,
demux->need_segment = FALSE; demux->need_segment = FALSE;
} }
if (stream->send_stream_headers) {
if (stream->stream_headers != NULL) {
ret = gst_matroska_demux_push_stream_headers (demux, stream);
} else {
/* FIXME: perhaps we can just disable and skip this stream then */
GST_ELEMENT_ERROR (demux, STREAM, DECODE, (NULL),
("Failed to extract stream headers from codec private data"));
}
stream->send_stream_headers = FALSE;
}
if (stream->send_dvd_event) {
gst_matroska_demux_push_dvd_clut_change_event (demux, stream);
/* FIXME: should we send this event again after (flushing) seek ? */
stream->send_dvd_event = FALSE;
}
if (block_duration != -1) { if (block_duration != -1) {
if (stream->timecodescale == 1.0) if (stream->timecodescale == 1.0)
duration = gst_util_uint64_scale (block_duration, duration = gst_util_uint64_scale (block_duration,