diff --git a/config b/config index 968b63a..e3ba0ca 100644 --- a/config +++ b/config @@ -86,7 +86,9 @@ NGX_ADDON_SRCS="$NGX_ADDON_SRCS \ $ngx_addon_dir/hls/ngx_rtmp_mpegts.c \ $ngx_addon_dir/dash/ngx_rtmp_mp4.c \ " + CFLAGS="$CFLAGS -I$ngx_addon_dir" +# Debug build with all warnings as errors +# CFLAGS="$CFLAGS -I$ngx_addon_dir -Wall -Wpointer-arith -Wno-unused-parameter -Werror" USE_OPENSSL=YES - diff --git a/hls/ngx_rtmp_hls_module.c b/hls/ngx_rtmp_hls_module.c index c489a73..d04ba66 100644 --- a/hls/ngx_rtmp_hls_module.c +++ b/hls/ngx_rtmp_hls_module.c @@ -854,7 +854,6 @@ ngx_rtmp_hls_get_fragment_id(ngx_rtmp_session_t *s, uint64_t ts) static ngx_str_t * ngx_rtmp_hls_get_fragment_datetime(ngx_rtmp_session_t *s, uint64_t ts) { - ngx_rtmp_hls_ctx_t *ctx; ngx_rtmp_hls_app_conf_t *hacf; ngx_str_t *datetime; ngx_tm_t tm; @@ -864,7 +863,6 @@ ngx_rtmp_hls_get_fragment_datetime(ngx_rtmp_session_t *s, uint64_t ts) datetime->data = NULL; datetime->len = 0; - ctx = ngx_rtmp_get_module_ctx(s, ngx_rtmp_hls_module); hacf = ngx_rtmp_get_module_app_conf(s, ngx_rtmp_hls_module); switch (hacf->datetime) { @@ -889,7 +887,7 @@ ngx_rtmp_hls_get_fragment_datetime(ngx_rtmp_session_t *s, uint64_t ts) case NGX_RTMP_HLS_DATETIME_SYSTEM: datetime->data = (u_char *) ngx_pcalloc(s->connection->pool, ngx_cached_http_log_iso8601.len * sizeof(u_char)); - ngx_cpymem(datetime->data, ngx_cached_http_log_iso8601.data, ngx_cached_http_log_iso8601.len); + ngx_memcpy(datetime->data, ngx_cached_http_log_iso8601.data, ngx_cached_http_log_iso8601.len); datetime->len = ngx_cached_http_log_iso8601.len; return datetime; diff --git a/ngx_rtmp.h b/ngx_rtmp.h index a24bee8..c3fa8ee 100644 --- a/ngx_rtmp.h +++ b/ngx_rtmp.h @@ -583,6 +583,9 @@ ngx_int_t ngx_rtmp_send_status(ngx_rtmp_session_t *s, char *code, ngx_int_t ngx_rtmp_send_play_status(ngx_rtmp_session_t *s, char *code, char* level, ngx_uint_t duration, ngx_uint_t bytes); ngx_int_t ngx_rtmp_send_sample_access(ngx_rtmp_session_t *s); +ngx_int_t ngx_rtmp_send_redirect_status(ngx_rtmp_session_t *s, + char *callMethod, char *desc, ngx_str_t to_url); +ngx_int_t ngx_rtmp_send_close_method(ngx_rtmp_session_t *s, char *methodName); /* Frame types */ diff --git a/ngx_rtmp_relay_module.c b/ngx_rtmp_relay_module.c index f16b26a..a461fb9 100644 --- a/ngx_rtmp_relay_module.c +++ b/ngx_rtmp_relay_module.c @@ -501,7 +501,7 @@ ngx_rtmp_relay_create_connection(ngx_rtmp_conf_ctx_t *cctx, ngx_str_t* name, rctx->session = rs; ngx_rtmp_set_ctx(rs, rctx, ngx_rtmp_relay_module); ngx_str_set(&rs->flashver, "ngx-local-relay"); - ngx_cpymem(&rs->app, &rctx->app, sizeof(rctx->app)); + ngx_memcpy(&rs->app, &rctx->app, sizeof(rctx->app)); #if (NGX_STAT_STUB) (void) ngx_atomic_fetch_add(ngx_stat_active, 1);