1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

fix #502, transcoder support snapshot.

This commit is contained in:
winlin 2015-10-20 14:52:34 +08:00
parent 2bae6e09d3
commit 29122b6e70
6 changed files with 28 additions and 18 deletions

View file

@ -76,15 +76,16 @@ int SrsProcess::initialize(string binary, vector<string> argv)
for (int i = 0; i < (int)argv.size(); i++) {
std::string ffp = argv[i];
std::string nffp = (i < (int)argv.size() -1)? argv[i + 1] : "";
// remove the stdout and stderr.
if (ffp == "1") {
if (ffp == "1" && nffp == ">") {
if (i + 2 < (int)argv.size()) {
stdout_file = argv[i + 2];
i += 2;
}
continue;
} else if (ffp == "2") {
} else if (ffp == "2" && nffp == ">") {
if (i + 2 < (int)argv.size()) {
stderr_file = argv[i + 2];
i += 2;