tests/onvif: don't push buffers outside segment
authorMathieu Duponchelle <mathieu@centricular.com>
Tue, 26 Apr 2022 23:10:46 +0000 (01:10 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 27 Apr 2022 06:39:24 +0000 (06:39 +0000)
segment->stop is exclusive, so in reverse playback mode we do not
need to output a buffer at that position as it will simply get
clipped in basesink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2303>

subprojects/gst-rtsp-server/tests/check/gst/onvif.c

index f33e50d..3d115a8 100644 (file)
@@ -290,7 +290,7 @@ test_src_do_seek (GstBaseSrc * bsrc, GstSegment * segment)
 
   if (src->segment->rate < 0) {
     guint64 n_frames =
-        ROUND_DOWN_TO_10 (gst_util_uint64_scale (src->segment->stop, 1000,
+        ROUND_DOWN_TO_10 (gst_util_uint64_scale (src->segment->stop - 1, 1000,
             GST_SECOND));
 
     src->segment->position = n_frames * GST_MSECOND;