mirror of
https://github.com/zotanmew/nginx-rtmp-module.git
synced 2024-05-18 17:21:08 +02:00
fixed time formatting & file op error code check
This commit is contained in:
parent
c928742cb9
commit
43718388f4
|
@ -340,7 +340,7 @@ ngx_rtmp_dash_write_playlist(ngx_rtmp_session_t *s)
|
|||
ngx_rtmp_dash_get_frag(s, 0)->timestamp / 1000, &tm);
|
||||
|
||||
*ngx_sprintf(start_time, "%4d-%02d-%02dT%02d:%02d:%02d%c%02d:%02d",
|
||||
tm.tm_year, tm.tm_mon,
|
||||
tm.tm_year + 1900, tm.tm_mon + 1,
|
||||
tm.tm_mday, tm.tm_hour,
|
||||
tm.tm_min, tm.tm_sec,
|
||||
ctx->start_time.gmtoff < 0 ? '-' : '+',
|
||||
|
@ -353,7 +353,7 @@ ngx_rtmp_dash_write_playlist(ngx_rtmp_session_t *s)
|
|||
1000, &tm);
|
||||
|
||||
*ngx_sprintf(end_time, "%4d-%02d-%02dT%02d:%02d:%02d%c%02d:%02d",
|
||||
tm.tm_year, tm.tm_mon,
|
||||
tm.tm_year + 1900, tm.tm_mon + 1,
|
||||
tm.tm_mday, tm.tm_hour,
|
||||
tm.tm_min, tm.tm_sec,
|
||||
ctx->start_time.gmtoff < 0 ? '-' : '+',
|
||||
|
|
|
@ -315,7 +315,7 @@ ngx_rtmp_hls_create_parent_dir(ngx_rtmp_session_t *s)
|
|||
|
||||
*ngx_snprintf(path, sizeof(path) - 1, "%V", &hacf->path) = 0;
|
||||
|
||||
if (ngx_create_dir(path, NGX_RTMP_HLS_DIR_ACCESS) != NGX_OK) {
|
||||
if (ngx_create_dir(path, NGX_RTMP_HLS_DIR_ACCESS) == NGX_FILE_ERROR) {
|
||||
err = ngx_errno;
|
||||
if (err != NGX_EEXIST) {
|
||||
ngx_log_error(NGX_LOG_ERR, s->connection->log, err,
|
||||
|
@ -342,7 +342,7 @@ ngx_rtmp_hls_create_parent_dir(ngx_rtmp_session_t *s)
|
|||
ngx_log_debug1(NGX_LOG_DEBUG_RTMP, s->connection->log, 0,
|
||||
"hls: creating nested folder: '%s'", path);
|
||||
|
||||
if (ngx_create_dir(path, NGX_RTMP_HLS_DIR_ACCESS) != NGX_OK) {
|
||||
if (ngx_create_dir(path, NGX_RTMP_HLS_DIR_ACCESS) == NGX_FILE_ERROR) {
|
||||
ngx_log_error(NGX_LOG_ERR, s->connection->log, ngx_errno,
|
||||
"hls: error creating nested folder: '%s'", path);
|
||||
return NGX_ERROR;
|
||||
|
|
Loading…
Reference in a new issue