mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +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/4922>
This commit is contained in:
parent
38beda2b8e
commit
3cbfe5a481
1 changed files with 6 additions and 0 deletions
|
@ -2186,6 +2186,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