diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index 023c670c06..86271413d2 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -3238,23 +3238,6 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux, 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) break; @@ -3391,6 +3374,23 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux, 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 (stream->timecodescale == 1.0) duration = gst_util_uint64_scale (block_duration,