render: open process as "wb" not "w"

This commit is contained in:
2026-01-11 17:00:08 -05:00
parent e68dfa3c94
commit d2bc5696bb

View File

@@ -7,10 +7,10 @@
#include <string> #include <string>
#include "log.h" #include "log.h"
#include "path_.h"
#include "process_.h" #include "process_.h"
#include "sdl.h" #include "sdl.h"
#include "string_.h" #include "string_.h"
#include "path_.h"
using namespace anm2ed::resource; using namespace anm2ed::resource;
using namespace anm2ed::util; using namespace anm2ed::util;
@@ -85,8 +85,8 @@ namespace anm2ed
} }
} }
command = std::format("\"{0}\" -y -f rawvideo -pix_fmt rgba -s {1}x{2} -r {3} -i pipe:0", ffmpegPathString, command = std::format("\"{0}\" -y -f rawvideo -pix_fmt rgba -s {1}x{2} -r {3} -i pipe:0", ffmpegPathString, size.x,
size.x, size.y, fps); size.y, fps);
if (!audioInputArguments.empty()) command += " " + audioInputArguments; if (!audioInputArguments.empty()) command += " " + audioInputArguments;
@@ -119,7 +119,7 @@ namespace anm2ed
logger.command(command); logger.command(command);
Process process(command.c_str(), "w"); Process process(command.c_str(), "wb");
if (!process.get()) if (!process.get())
{ {