mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix path issue.
This commit is contained in:
parent
066158de61
commit
570c0d66bd
1 changed files with 6 additions and 7 deletions
|
@ -152,10 +152,7 @@ public:
|
|||
|
||||
data = string(ss.data(), ss.size()) + data;
|
||||
|
||||
char file_path[1024] = {0};
|
||||
sprintf(file_path, "%s/%s/%sSeg1-Frag%d", _srs_config->get_hds_path(req->vhost).c_str()
|
||||
, req->app.c_str(), req->stream.c_str(), index);
|
||||
|
||||
const char *file_path = path.c_str();
|
||||
int fd = open(file_path, O_WRONLY | O_CREAT, S_IRWXU | S_IRGRP | S_IROTH);
|
||||
if (fd < 0) {
|
||||
srs_error("open fragment file failed, path=%s", file_path);
|
||||
|
@ -203,9 +200,11 @@ public:
|
|||
*/
|
||||
inline void set_index(int idx)
|
||||
{
|
||||
char fg_name[1024] = {0};
|
||||
sprintf(fg_name, "/var/www/live/stream0Seg1-Frag%d", idx);
|
||||
path = fg_name;
|
||||
char file_path[1024] = {0};
|
||||
sprintf(file_path, "%s/%s/%sSeg1-Frag%d", _srs_config->get_hds_path(req->vhost).c_str()
|
||||
, req->app.c_str(), req->stream.c_str(), idx);
|
||||
|
||||
path = file_path;
|
||||
index = idx;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue