This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit a7d86986174e54a4b1d8bab29133f330c4e90201 Author: Michael Niedermayer <[email protected]> AuthorDate: Sun Sep 20 18:10:53 2026 +0200 Commit: michaelni <[email protected]> CommitDate: Sat Sep 26 11:36:30 2026 +0000 ffplay: make seek_chapter take the chapter index The callers pass the index relative to the current chapter themselves, so the function can serve seeks to an arbitrary chapter too. Assisted-by: Claude --- fftools/ffplay.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index 108aa05ce4..88763bcb94 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -3716,14 +3716,9 @@ static int current_chapter(VideoState *is) return i - 1; } -static void seek_chapter(VideoState *is, int incr) +static void seek_chapter(VideoState *is, int i) { - int i; - - if (!is->ic->nb_chapters) - return; - - i = FFMAX(current_chapter(is) + incr, 0); + i = FFMAX(i, 0); if (i >= is->ic->nb_chapters) return; @@ -3801,14 +3796,14 @@ static void event_loop(VideoState *cur_stream) incr = 600.0; goto do_seek; } - seek_chapter(cur_stream, 1); + seek_chapter(cur_stream, current_chapter(cur_stream) + 1); break; case SDLK_PAGEDOWN: if (cur_stream->ic->nb_chapters <= 1) { incr = -600.0; goto do_seek; } - seek_chapter(cur_stream, -1); + seek_chapter(cur_stream, current_chapter(cur_stream) - 1); break; case SDLK_LEFT: incr = seek_interval ? -seek_interval : -10.0; -- 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]
