1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-13 11:51:57 +00:00

support redirect stdout by >

This commit is contained in:
winlin 2016-01-20 14:00:01 +08:00
parent 0cd15068de
commit a6dc17a67d

View file

@ -80,6 +80,12 @@ int SrsProcess::initialize(string binary, vector<string> argv)
std::string nffp = (i < (int)argv.size() - 1)? argv[i + 1] : "";
std::string nnffp = (i < (int)argv.size() - 2)? argv[i + 2] : "";
// >file
if (srs_string_starts_with(ffp, ">")) {
stdout_file = ffp.substr(1);
continue;
}
// 1>file
if (srs_string_starts_with(ffp, "1>")) {
stdout_file = ffp.substr(2);