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;