Commit d6ef2041 authored by Mark Nauwelaerts's avatar Mark Nauwelaerts

matroskademux: generate correct segment stream time

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=680275
parent 4b920221
......@@ -3436,9 +3436,6 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux,
GstSegment *segment = &demux->common.segment;
guint64 segment_duration = 0;
GST_DEBUG_OBJECT (demux,
"generating segment starting at %" GST_TIME_FORMAT,
GST_TIME_ARGS (lace_time));
if (!GST_CLOCK_TIME_IS_VALID (demux->stream_start_time)) {
demux->stream_start_time = lace_time;
GST_DEBUG_OBJECT (demux,
......@@ -3456,7 +3453,11 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux,
segment->base += segment_duration / fabs (segment->rate);
segment->start = MAX (lace_time, demux->stream_start_time);
segment->stop = GST_CLOCK_TIME_NONE;
segment->time = segment->start - demux->stream_start_time;
segment->position = segment->start - demux->stream_start_time;
GST_DEBUG_OBJECT (demux,
"generated segment starting at %" GST_TIME_FORMAT ": %"
GST_SEGMENT_FORMAT, GST_TIME_ARGS (lace_time), segment);
}
/* now convey our segment notion downstream */
gst_matroska_demux_send_event (demux, gst_event_new_segment (segment));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment