summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2021-04-23 07:18:48 +0200
committerEdward Hervey <bilboed@bilboed.com>2021-04-23 07:18:48 +0200
commit338db31c4a0ad618058f4e464dd51959e1f2534c (patch)
tree09d71c760c688f7ce7d742600dc232758c06a080
parent7cbc183044c04dd14a099de8e12479da21ae0087 (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/197>
-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 98c719d..55d2b31 100644
--- a/gst/rtsp-server/rtsp-media.c
+++ b/gst/rtsp-server/rtsp-media.c
@@ -2946,7 +2946,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;