From 69b4474367bfe292cb5a51671fe6e792cf4bc4ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 8 Dec 2025 22:35:33 +0200 Subject: [PATCH] swscale/tests: Fix fate-sws-ops-list on Windows Set stdout to binary mode, to avoid platform specific differences in the output that is hashed. --- libswscale/tests/sws_ops.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libswscale/tests/sws_ops.c b/libswscale/tests/sws_ops.c index 8bb44d634d..06fb87e3ae 100644 --- a/libswscale/tests/sws_ops.c +++ b/libswscale/tests/sws_ops.c @@ -22,6 +22,11 @@ #include "libswscale/ops.h" #include "libswscale/format.h" +#ifdef _WIN32 +#include +#include +#endif + static int run_test(SwsContext *const ctx, AVFrame *frame, const AVPixFmtDescriptor *const src_desc, const AVPixFmtDescriptor *const dst_desc) @@ -73,6 +78,10 @@ int main(int argc, char **argv) { int ret = 1; +#ifdef _WIN32 + _setmode(_fileno(stdout), _O_BINARY); +#endif + SwsContext *ctx = sws_alloc_context(); AVFrame *frame = av_frame_alloc(); if (!ctx || !frame)