From a24227d7ad25dcd44046b39c44792fdb9679e929 Mon Sep 17 00:00:00 2001 From: nanahi <130121847+na-na-hi@users.noreply.github.com> Date: Sat, 23 May 2026 08:49:52 -0400 Subject: [PATCH] stream/stream_bluray: fix chapter range check Fixes: 62786c0c91304aab720cf52674868c52a5b76f72 --- stream/stream_bluray.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stream/stream_bluray.c b/stream/stream_bluray.c index ef048afd1f..b28f452675 100644 --- a/stream/stream_bluray.c +++ b/stream/stream_bluray.c @@ -204,7 +204,7 @@ static int bluray_stream_control(stream_t *s, int cmd, void *arg) return STREAM_UNSUPPORTED; int chapter = *(double *)arg; double time = MP_NOPTS_VALUE; - if (chapter >= 0 || chapter < ti->chapter_count) + if (chapter >= 0 && chapter < ti->chapter_count) time = BD_TIME_TO_MP(ti->chapters[chapter].start); if (time == MP_NOPTS_VALUE) return STREAM_ERROR;