stream/stream_bluray: fix chapter range check

Fixes: 62786c0c91
This commit is contained in:
nanahi authored and Kacper Michajłow committed 2026-06-08 01:26:23 +02:00
1 parent f29fcafb81
commit a24227d7ad
1 file changed
+1 -1
+1 -1
View File
@@ -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;