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

fix #119: use iformat and oformat for ffmpeg transcode.

This commit is contained in:
winlin 2014-07-19 15:20:16 +08:00
parent 9bf7b722db
commit f8423dfa90
5 changed files with 15 additions and 6 deletions

View file

@ -76,6 +76,11 @@ void SrsFFMPEG::set_iparams(string iparams)
_iparams = iparams;
}
void SrsFFMPEG::set_oformat(string format)
{
oformat = format;
}
string SrsFFMPEG::output()
{
return _output;
@ -243,7 +248,7 @@ int SrsFFMPEG::start()
}
// input.
if (iformat != "off") {
if (iformat != "off" && !iformat.empty()) {
params.push_back("-f");
params.push_back(iformat);
}
@ -346,7 +351,7 @@ int SrsFFMPEG::start()
}
// output
if (oformat != "off") {
if (oformat != "off" && !oformat.empty()) {
params.push_back("-f");
params.push_back(oformat);
}