From fcce9b62d5250bbdefbcd5b3589de36666f8deb1 Mon Sep 17 00:00:00 2001 From: Bruno Herbelin Date: Sat, 27 Jan 2024 18:30:12 +0100 Subject: [PATCH] BugFix Bounce playback at first frame --- src/MediaPlayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MediaPlayer.cpp b/src/MediaPlayer.cpp index 06fb050..caff080 100644 --- a/src/MediaPlayer.cpp +++ b/src/MediaPlayer.cpp @@ -1346,7 +1346,7 @@ void MediaPlayer::execute_seek_command(GstClockTime target, bool force) if (target == GST_CLOCK_TIME_NONE) { // create seek event with current position (called for rate changed) // CLAMP the time to ensure we do not bounce outside of timeline - seek_pos = CLAMP(position_, timeline_.first() + timeline_.step(), timeline_.last() - timeline_.step()); + seek_pos = CLAMP(position_, timeline_.first(), timeline_.last() - timeline_.step()); // seek with KEY mode if playing seek_flags |= GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_AFTER; }