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.
This commit is contained in:
Martin Storsjö
2025-12-08 22:35:33 +02:00
parent c94e8afe5d
commit 69b4474367

View File

@@ -22,6 +22,11 @@
#include "libswscale/ops.h"
#include "libswscale/format.h"
#ifdef _WIN32
#include <io.h>
#include <fcntl.h>
#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)