Skip to content

Commit e636a04

Browse files
committed
Fixed DASH availability start time.
1 parent 1cdeb07 commit e636a04

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dash/ngx_rtmp_dash_module.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ typedef struct {
5252
ngx_str_t playlist_bak;
5353
ngx_str_t name;
5454
ngx_str_t stream;
55-
ngx_time_t start_time;
55+
time_t start_time;
5656

5757
ngx_uint_t nfrags;
5858
ngx_uint_t frag;
@@ -337,7 +337,7 @@ ngx_rtmp_dash_write_playlist(ngx_rtmp_session_t *s)
337337
" </Period>\n" \
338338
"</MPD>\n"
339339

340-
ngx_libc_gmtime(ctx->start_time.sec / 1000, &tm);
340+
ngx_libc_gmtime(ctx->start_time, &tm);
341341

342342
ngx_sprintf(start_time, "%4d-%02d-%02dT%02d:%02d:%02dZ%Z",
343343
tm.tm_year + 1900, tm.tm_mon + 1,
@@ -938,7 +938,7 @@ ngx_rtmp_dash_publish(ngx_rtmp_session_t *s, ngx_rtmp_publish_t *v)
938938
"dash: playlist='%V' playlist_bak='%V' stream_pattern='%V'",
939939
&ctx->playlist, &ctx->playlist_bak, &ctx->stream);
940940

941-
ctx->start_time = *ngx_cached_time;
941+
ctx->start_time = ngx_time();
942942

943943
if (ngx_rtmp_dash_ensure_directory(s) != NGX_OK) {
944944
return NGX_ERROR;

0 commit comments

Comments
 (0)