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>
This commit is contained in:
Edward Hervey 2021-04-23 07:18:48 +02:00 committed by Edward Hervey
parent 7cbc183044
commit 338db31c4a

View file

@ -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;