mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 05:59:10 +00:00
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:
parent
8f7962e1c3
commit
6604614dc5
1 changed files with 2 additions and 2 deletions
|
@ -1272,7 +1272,7 @@ gst_qtdemux_adjust_seek (GstQTDemux * qtdemux, gint64 desired_time,
|
||||||
|
|
||||||
/* get segment and time in the segment */
|
/* get segment and time in the segment */
|
||||||
seg = &str->segments[seg_idx];
|
seg = &str->segments[seg_idx];
|
||||||
seg_time = desired_time - seg->time;
|
seg_time = (desired_time - seg->time) * seg->rate;
|
||||||
|
|
||||||
while (QTSEGMENT_IS_EMPTY (seg)) {
|
while (QTSEGMENT_IS_EMPTY (seg)) {
|
||||||
seg_time = 0;
|
seg_time = 0;
|
||||||
|
@ -4400,7 +4400,7 @@ gst_qtdemux_stream_segment_get_boundaries (GstQTDemux * qtdemux,
|
||||||
segment = &stream->segments[stream->segment_index];
|
segment = &stream->segments[stream->segment_index];
|
||||||
|
|
||||||
/* get time in this segment */
|
/* 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_LOG_OBJECT (stream->pad, "seg_time %" GST_TIME_FORMAT,
|
||||||
GST_TIME_ARGS (seg_time));
|
GST_TIME_ARGS (seg_time));
|
||||||
|
|
Loading…
Reference in a new issue