validate: flow: Fix for line-ending mismatch issue on Windows

Unlike POSIX system, Windows distinguishes "w" and "wb" and when
a file is opened with text mode, OS will translate \n into \r\n.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1092>
This commit is contained in:
Seungha Yang 2021-10-07 19:28:41 +09:00 committed by GStreamer Marge Bot
parent a2aa2cda42
commit 551239c618

View file

@ -423,7 +423,7 @@ validate_flow_setup_files (ValidateFlowOverride * flow, gint default_generate)
g_free (directory_path); g_free (directory_path);
} }
flow->output_file = fopen (flow->output_file_path, "w"); flow->output_file = fopen (flow->output_file_path, "wb");
if (!flow->output_file) if (!flow->output_file)
gst_validate_abort ("Could not open for writing: %s", gst_validate_abort ("Could not open for writing: %s",
flow->output_file_path); flow->output_file_path);