rtsp-media: Improve skipping trickmode seek.

We can also skip the seek if the end range is already
correct.

Avoids initial seek on play start if playing full stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/194>
This commit is contained in:
Doug Nazar 2021-04-16 14:35:02 -04:00
parent 747eaf3634
commit 7cbc183044

View file

@ -2946,8 +2946,8 @@ gst_rtsp_media_seek_trickmode (GstRTSPMedia * media,
}
}
if (start == current_position && stop_type == GST_SEEK_TYPE_NONE &&
!force_seek) {
if (!force_seek && start == current_position &&
(stop_type == GST_SEEK_TYPE_NONE || stop == priv->range_stop)) {
GST_DEBUG ("no position change, no flags set by caller, so not seeking");
res = TRUE;
} else {