qtdemux: properly activate segment with rate != 1.0

Also use the qt rate to identify the position within a qt segment
to properly translate playback time to qt media time

https://bugzilla.gnome.org/show_bug.cgi?id=765669
This commit is contained in:
Thiago Santos 2016-05-03 10:41:06 -03:00
parent 8f7962e1c3
commit 6604614dc5

View file

@ -1272,7 +1272,7 @@ gst_qtdemux_adjust_seek (GstQTDemux * qtdemux, gint64 desired_time,
/* get segment and time in the segment */
seg = &str->segments[seg_idx];
seg_time = desired_time - seg->time;
seg_time = (desired_time - seg->time) * seg->rate;
while (QTSEGMENT_IS_EMPTY (seg)) {
seg_time = 0;
@ -4400,7 +4400,7 @@ gst_qtdemux_stream_segment_get_boundaries (GstQTDemux * qtdemux,
segment = &stream->segments[stream->segment_index];
/* get time in this segment */
seg_time = offset - segment->time;
seg_time = (offset - segment->time) * segment->rate;
GST_LOG_OBJECT (stream->pad, "seg_time %" GST_TIME_FORMAT,
GST_TIME_ARGS (seg_time));