summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2021-04-23 07:18:48 +0200
committerTim-Philipp Müller <tim@centricular.com>2021-04-23 12:39:47 +0100
commit2ac0cbfba154a61c43927cf6f91e52c99f9e5c53 (patch)
tree2c1ad13044c91b983b5555be03fe1ad891d5130e
parent1286ae96d0c6b6f8047cfc664191b39893fc6cce (diff)
rtsp-media: Add one more case to seek avoidance
This is an extension to the previous commit. There can also be cases where the start position is not specified, in those cases we should also avoid doing seeking unless it's forced. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/199>
-rw-r--r--gst/rtsp-server/rtsp-media.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gst/rtsp-server/rtsp-media.c b/gst/rtsp-server/rtsp-media.c
index 212792f..6e55b44 100644
--- a/gst/rtsp-server/rtsp-media.c
+++ b/gst/rtsp-server/rtsp-media.c
@@ -2928,7 +2928,8 @@ gst_rtsp_media_seek_trickmode (GstRTSPMedia * media,
}
}
- if (!force_seek && start == current_position &&
+ if (!force_seek &&
+ (start_type == GST_SEEK_TYPE_NONE || 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;