Merge branch 'dev' of github.com:sergey-dryabzhinsky/nginx-rtmp-module into dev

This commit is contained in:
root 2020-12-30 03:50:17 +00:00
commit 6c4be06423
6 changed files with 12 additions and 10 deletions

View file

@ -157,7 +157,7 @@ streaming. While this feature can be enabled through rtmp_auto_push on|off direc
application big { application big {
live on; live on;
# On every pusblished stream run this command (ffmpeg) # On every published stream run this command (ffmpeg)
# with substitutions: $app/${app}, $name/${name} for application & stream name. # with substitutions: $app/${app}, $name/${name} for application & stream name.
# #
# This ffmpeg call receives stream from this application & # This ffmpeg call receives stream from this application &

View file

@ -9,7 +9,7 @@ $ cd /usr/build
Download & unpack latest nginx-rtmp (you can also use http) Download & unpack latest nginx-rtmp (you can also use http)
```sh ```sh
$ git clone git://github.com/arut/nginx-rtmp-module.git $ git clone git://github.com/sergey-dryabzhinsky/nginx-rtmp-module
``` ```
Download & unpack nginx (you can also use svn) Download & unpack nginx (you can also use svn)

View file

@ -985,12 +985,13 @@ ngx_rtmp_hls_get_fragment_datetime(ngx_rtmp_session_t *s, uint64_t ts)
msec += (ts / 90); msec += (ts / 90);
ngx_gmtime(msec / 1000, &tm); ngx_gmtime(msec / 1000, &tm);
datetime->data = (u_char *) ngx_pcalloc(s->connection->pool, ngx_cached_http_log_iso8601.len * sizeof(u_char)); datetime->len = sizeof("1970-01-01T00:00:00.000-00:00") - 1;
(void) ngx_sprintf(datetime->data, "%4d-%02d-%02dT%02d:%02d:%02d-00:00", datetime->data = (u_char *) ngx_pcalloc(s->connection->pool, datetime->len * sizeof(u_char));
(void) ngx_sprintf(datetime->data, "%4d-%02d-%02dT%02d:%02d:%02d.%03d-00:00",
tm.ngx_tm_year, tm.ngx_tm_mon, tm.ngx_tm_year, tm.ngx_tm_mon,
tm.ngx_tm_mday, tm.ngx_tm_hour, tm.ngx_tm_mday, tm.ngx_tm_hour,
tm.ngx_tm_min, tm.ngx_tm_sec); tm.ngx_tm_min, tm.ngx_tm_sec,
datetime->len = ngx_cached_http_log_iso8601.len; msec % 1000);
return datetime; return datetime;
case NGX_RTMP_HLS_DATETIME_SYSTEM: case NGX_RTMP_HLS_DATETIME_SYSTEM:

View file

@ -166,6 +166,7 @@ ngx_rtmp_eval(void *ctx, ngx_str_t *in, ngx_rtmp_eval_t **e, ngx_str_t *out,
state = ESCAPE; state = ESCAPE;
continue; continue;
} }
/* fall through */
case ESCAPE: case ESCAPE:
ngx_rtmp_eval_append(&b, &c, 1, log); ngx_rtmp_eval_append(&b, &c, 1, log);

View file

@ -1227,7 +1227,7 @@ ngx_rtmp_live_on_fi(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
{ NGX_RTMP_AMF_STRING, { NGX_RTMP_AMF_STRING,
ngx_null_string, ngx_null_string,
"onFi", 0 }, "onFI", 0 },
{ NGX_RTMP_AMF_MIXED_ARRAY, { NGX_RTMP_AMF_MIXED_ARRAY,
ngx_null_string, ngx_null_string,
@ -1254,7 +1254,7 @@ ngx_rtmp_live_on_fi(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
if (res == NGX_OK) { if (res == NGX_OK) {
ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0, ngx_log_error(NGX_LOG_DEBUG, s->connection->log, 0,
"live: onFi: date='%s', time='%s'", "live: onFI: date='%s', time='%s'",
v.date, v.time); v.date, v.time);
out_dt_elts[0].data = v.date; out_dt_elts[0].data = v.date;
@ -1513,7 +1513,7 @@ ngx_rtmp_live_postconfiguration(ngx_conf_t *cf)
ch->handler = ngx_rtmp_live_on_cue_point; ch->handler = ngx_rtmp_live_on_cue_point;
ch = ngx_array_push(&cmcf->amf); ch = ngx_array_push(&cmcf->amf);
ngx_str_set(&ch->name, "onFi"); ngx_str_set(&ch->name, "onFI");
ch->handler = ngx_rtmp_live_on_fi; ch->handler = ngx_rtmp_live_on_fi;
ch = ngx_array_push(&cmcf->amf); ch = ngx_array_push(&cmcf->amf);

View file

@ -895,7 +895,7 @@ ngx_rtmp_create_fi(ngx_rtmp_session_t *s)
{ NGX_RTMP_AMF_STRING, { NGX_RTMP_AMF_STRING,
ngx_null_string, ngx_null_string,
"onFi", 0 }, "onFI", 0 },
{ NGX_RTMP_AMF_NUMBER, { NGX_RTMP_AMF_NUMBER,
ngx_null_string, ngx_null_string,