mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix #89, config to /dev/null to disable ffmpeg log. 0.9.117
This commit is contained in:
parent
14f0a2e046
commit
d74921e1ab
7 changed files with 36 additions and 23 deletions
|
@ -287,18 +287,20 @@ int SrsEncoder::initialize_ffmpeg(SrsFFMPEG* ffmpeg, SrsRequest* req, SrsConfDir
|
|||
output = srs_string_replace(output, "[stream]", req->stream);
|
||||
output = srs_string_replace(output, "[engine]", engine->arg0());
|
||||
|
||||
std::string log_file;
|
||||
std::string log_file = "/dev/null"; // disabled
|
||||
// write ffmpeg info to log file.
|
||||
log_file = _srs_config->get_ffmpeg_log_dir();
|
||||
log_file += "/";
|
||||
log_file += "ffmpeg-encoder";
|
||||
log_file += "-";
|
||||
log_file += req->vhost;
|
||||
log_file += "-";
|
||||
log_file += req->app;
|
||||
log_file += "-";
|
||||
log_file += req->stream;
|
||||
log_file += ".log";
|
||||
if (_srs_config->get_ffmpeg_log_enabled()) {
|
||||
log_file = _srs_config->get_ffmpeg_log_dir();
|
||||
log_file += "/";
|
||||
log_file += "ffmpeg-encoder";
|
||||
log_file += "-";
|
||||
log_file += req->vhost;
|
||||
log_file += "-";
|
||||
log_file += req->app;
|
||||
log_file += "-";
|
||||
log_file += req->stream;
|
||||
log_file += ".log";
|
||||
}
|
||||
|
||||
// important: loop check, donot transcode again.
|
||||
std::vector<std::string>::iterator it;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue