From a6dc17a67d74d284b15b5a797600ba3f9dc28c4c Mon Sep 17 00:00:00 2001 From: winlin Date: Wed, 20 Jan 2016 14:00:01 +0800 Subject: [PATCH] support redirect stdout by > --- trunk/src/app/srs_app_process.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/trunk/src/app/srs_app_process.cpp b/trunk/src/app/srs_app_process.cpp index 95c90f703..dca1fe55d 100644 --- a/trunk/src/app/srs_app_process.cpp +++ b/trunk/src/app/srs_app_process.cpp @@ -80,6 +80,12 @@ int SrsProcess::initialize(string binary, vector 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);