output: Fix writing to stdout on Windows
1 unresolved thread
1 unresolved thread
Compare changes
+ 10
− 0
@@ -39,6 +39,11 @@
@@ -141,6 +146,11 @@ int output_open(MuxerContext **const c_out,
I think this would break the md5 and xxhash muxers, since they output text with
\n
.Maybe this should be put in the
*_open
function of the muxers that actually output binary data instead (yuv, y4m2).It doesn't seem to break anything - from my testing, running it from cmd or PowerShell still produces a newline on
\n
. I did it this way because the md5 and xxhash muxers callfopen
with"wb"
, so they technically output binary data too. Maybe it would make sense to do what you suggested and also change those two to"w"
?Importantly, they only fopen the file
wb
if it's NOTstdout
. I don't thinkb
should be dropped there, since that would create different checksum files depending on OS.I'm not sure how Windows behaves on
\n
instead of\r\n
. My assumption was that it does not do a proper line break.