From 44ecb56c839732a39af9943bd558dcd1950273c6 Mon Sep 17 00:00:00 2001 From: PureChocolate Date: Wed, 12 Aug 2026 23:55:47 -0700 Subject: [PATCH] Fix Windows build under NOMINMAX: use std::max The WIN32 branch uses unqualified max, which only compiles when windows.h's max macro is defined. NOMINMAX builds fail on this line. The non-WIN32 branch already uses std::max, and is included, so this aligns both branches to work in all configurations. --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index d3e0b49..08f1f58 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -204,7 +204,7 @@ int main(int argc, char** argv) { else if (arg == "--codec-context-frames") { if (i+1 < argc) { #ifdef WIN32 - try { params.codec_decode_context_frames = max(0, std::stoi(argv[++i])); } catch(...) {} + try { params.codec_decode_context_frames = std::max(0, std::stoi(argv[++i])); } catch(...) {} #else try { params.codec_decode_context_frames = std::max(0, std::stoi(argv[++i])); } catch(...) {} #endif