summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Nazar <nazard@nazar.ca>2021-04-16 14:35:02 -0400
committerDoug Nazar <nazard@nazar.ca>2021-04-20 17:31:53 -0400
commit7cbc183044c04dd14a099de8e12479da21ae0087 (patch)
tree517fcf2dd31532d771d4670ee3c3d14e79a11a42
parent747eaf3634062df850955833299182c4ada97390 (diff)
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>
-rw-r--r--gst/rtsp-server/rtsp-media.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gst/rtsp-server/rtsp-media.c b/gst/rtsp-server/rtsp-media.c
index 0313ed4..98c719d 100644
--- a/gst/rtsp-server/rtsp-media.c
+++ b/gst/rtsp-server/rtsp-media.c
@@ -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 {