This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit cf3d01698217279db3e40bba8428f5bb6a2135f1
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Sun Sep 20 18:08:21 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Sat Sep 26 11:36:30 2026 +0000

    ffplay: seek to the previous chapter from the last one as well
    
    The chapter lookup left the index one past the end when the position
    lay inside the last chapter, so page down restarted that chapter
    instead of moving to the previous one like it does everywhere else.
    
    Assisted-by: Claude
---
 fftools/ffplay.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fftools/ffplay.c b/fftools/ffplay.c
index 7c163976f9..8fb129a0be 100644
--- a/fftools/ffplay.c
+++ b/fftools/ffplay.c
@@ -3713,13 +3713,11 @@ static void seek_chapter(VideoState *is, int incr)
     /* find the current chapter */
     for (i = 0; i < is->ic->nb_chapters; i++) {
         AVChapter *ch = is->ic->chapters[i];
-        if (av_compare_ts(pos, AV_TIME_BASE_Q, ch->start, ch->time_base) < 0) {
-            i--;
+        if (av_compare_ts(pos, AV_TIME_BASE_Q, ch->start, ch->time_base) < 0)
             break;
-        }
     }
 
-    i += incr;
+    i += incr - 1;
     i = FFMAX(i, 0);
     if (i >= is->ic->nb_chapters)
         return;

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to