Commit 0f558268 by xiongziliang

防止越权访问

parent 67d2beb5
......@@ -64,7 +64,7 @@ void FFmpegSource::play(const string &src_url,const string &dst_url,int timeout_
char cmd[1024] = {0};
snprintf(cmd, sizeof(cmd),ffmpeg_cmd.data(),ffmpeg_bin.data(),src_url.data(),dst_url.data());
_process.run(cmd,File::absolutePath("",true,ffmpeg_log));
_process.run(cmd,File::absolutePath("",false,ffmpeg_log));
InfoL << cmd;
if(_media_info._host == "127.0.0.1"){
......
......@@ -48,7 +48,7 @@ MediaReader::MediaReader(const string &strVhost,const string &strApp, const stri
}else{
strFileName = strApp + "/" + strId;
}
strFileName = File::absolutePath(strFileName,true,recordPath);
strFileName = File::absolutePath(strFileName, false,recordPath);
}
_hMP4File = MP4Read(strFileName.data());
......
......@@ -63,7 +63,7 @@ MediaRecorder::MediaRecorder(const string &strVhost_tmp,
}else{
m3u8FilePath = strApp + "/" + strId + "/hls.m3u8";
}
m3u8FilePath = File::absolutePath(m3u8FilePath,true,hlsPath);
m3u8FilePath = File::absolutePath(m3u8FilePath,false,hlsPath);
_hlsRecorder.reset(new HlsRecorder(m3u8FilePath,params,hlsBufSize, hlsDuration, hlsNum));
}
#endif //defined(ENABLE_HLS)
......@@ -79,7 +79,7 @@ MediaRecorder::MediaRecorder(const string &strVhost_tmp,
} else {
mp4FilePath = recordAppName + "/" + strApp + "/" + strId + "/";
}
mp4FilePath = File::absolutePath(mp4FilePath,true,recordPath);
mp4FilePath = File::absolutePath(mp4FilePath,false,recordPath);
_mp4Recorder.reset(new MP4Recorder(mp4FilePath,strVhost,strApp,strId));
}
#endif //defined(ENABLE_MP4RECORD)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论