mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
adaptivedemux2: Fix non-accurate seeking
If no accurate positioning was required, default to snap to the previous segment for improved responsiveness Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3914>
This commit is contained in:
parent
adc07d77d5
commit
597b684cd6
1 changed files with 6 additions and 0 deletions
|
@ -2241,6 +2241,12 @@ gst_adaptive_demux_handle_seek_event (GstAdaptiveDemux * demux,
|
|||
|
||||
GST_ADAPTIVE_DEMUX_SEGMENT_LOCK (demux);
|
||||
|
||||
if (!IS_SNAP_SEEK (flags) && !(flags & GST_SEEK_FLAG_ACCURATE)) {
|
||||
/* If no accurate seeking was specified, we want to default to seeking to
|
||||
* the previous segment for efficient/fast playback. */
|
||||
flags |= GST_SEEK_FLAG_KEY_UNIT;
|
||||
}
|
||||
|
||||
if (IS_SNAP_SEEK (flags)) {
|
||||
GstAdaptiveDemux2Stream *default_stream = NULL;
|
||||
GstAdaptiveDemux2Stream *stream = NULL;
|
||||
|
|
Loading…
Reference in a new issue