tests/onvif: don't push buffers outside segment

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>
This commit is contained in:
Mathieu Duponchelle 2022-04-27 01:10:46 +02:00 committed by GStreamer Marge Bot
parent efc29565d6
commit 9689693534

View file

@ -290,7 +290,7 @@ test_src_do_seek (GstBaseSrc * bsrc, GstSegment * segment)
if (src->segment->rate < 0) { if (src->segment->rate < 0) {
guint64 n_frames = 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)); GST_SECOND));
src->segment->position = n_frames * GST_MSECOND; src->segment->position = n_frames * GST_MSECOND;