mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
dashdemux: Add current fragment duration in reverse playback mode to the position
We play from the end of the fragment to the beginning, not from the beginning backwards.
This commit is contained in:
parent
9267b4a725
commit
5d09bc04a2
1 changed files with 3 additions and 0 deletions
|
@ -1292,6 +1292,8 @@ gst_dash_demux_stream_update_fragment_info (GstAdaptiveDemuxStream * stream)
|
|||
dashstream->actual_position =
|
||||
fragment.timestamp +
|
||||
dashstream->current_sync_sample * dashstream->keyframe_average_distance;
|
||||
if (stream->segment.rate < 0.0)
|
||||
dashstream->actual_position += dashstream->keyframe_average_distance;
|
||||
dashstream->actual_position =
|
||||
MIN (dashstream->actual_position,
|
||||
fragment.timestamp + stream->fragment.duration);
|
||||
|
@ -1332,6 +1334,7 @@ gst_dash_demux_stream_update_fragment_info (GstAdaptiveDemuxStream * stream)
|
|||
if (stream->demux->segment.rate < 0.0) {
|
||||
stream->fragment.range_end =
|
||||
stream->fragment.range_start + entry->size - 1;
|
||||
dashstream->actual_position += entry->duration;
|
||||
} else {
|
||||
stream->fragment.range_end = fragment.range_end;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue