Skip to content

Commit cdb396a

Browse files
committed
[fix] access check must come before gop cache play.
1 parent 2cae45c commit cdb396a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

config

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ RTMP_CORE_MODULES=" \
44
ngx_rtmp_module \
55
ngx_rtmp_core_module \
66
ngx_rtmp_cmd_module \
7+
ngx_rtmp_gop_cache_module \
78
ngx_rtmp_codec_module \
89
ngx_rtmp_access_module \
910
ngx_rtmp_record_module \
10-
ngx_rtmp_gop_cache_module \
1111
ngx_rtmp_live_module \
1212
ngx_rtmp_flv_live_index_module \
1313
ngx_rtmp_play_module \
@@ -37,6 +37,7 @@ RTMP_DEPS=" \
3737
$ngx_addon_dir/ngx_rtmp_amf.h \
3838
$ngx_addon_dir/ngx_rtmp_bandwidth.h \
3939
$ngx_addon_dir/ngx_rtmp_cmd_module.h \
40+
$ngx_addon_dir/ngx_rtmp_gop_cache_module.h \
4041
$ngx_addon_dir/ngx_rtmp_codec_module.h \
4142
$ngx_addon_dir/ngx_rtmp_eval.h \
4243
$ngx_addon_dir/ngx_rtmp.h \
@@ -45,12 +46,12 @@ RTMP_DEPS=" \
4546
$ngx_addon_dir/ngx_rtmp_netcall_module.h \
4647
$ngx_addon_dir/ngx_rtmp_play_module.h \
4748
$ngx_addon_dir/ngx_rtmp_record_module.h \
48-
$ngx_addon_dir/ngx_rtmp_gop_cache_module.h \
4949
$ngx_addon_dir/ngx_rtmp_relay_module.h \
5050
$ngx_addon_dir/ngx_rtmp_streams.h \
5151
$ngx_addon_dir/ngx_rtmp_bitop.h \
5252
$ngx_addon_dir/ngx_rtmp_proxy_protocol.h \
5353
$ngx_addon_dir/ngx_rtmp_variables.h \
54+
$ngx_addon_dir/hls/ngx_rtmp_hls_module.h \
5455
$ngx_addon_dir/hls/ngx_rtmp_mpegts.h \
5556
$ngx_addon_dir/hls/ngx_rtmp_mpegts_crc.h \
5657
$ngx_addon_dir/dash/ngx_rtmp_mp4.h \
@@ -69,10 +70,10 @@ RTMP_CORE_SRCS=" \
6970
$ngx_addon_dir/ngx_rtmp_receive.c \
7071
$ngx_addon_dir/ngx_rtmp_core_module.c \
7172
$ngx_addon_dir/ngx_rtmp_cmd_module.c \
73+
$ngx_addon_dir/ngx_rtmp_gop_cache_module.c \
7274
$ngx_addon_dir/ngx_rtmp_codec_module.c \
7375
$ngx_addon_dir/ngx_rtmp_access_module.c \
7476
$ngx_addon_dir/ngx_rtmp_record_module.c \
75-
$ngx_addon_dir/ngx_rtmp_gop_cache_module.c \
7677
$ngx_addon_dir/ngx_rtmp_live_module.c \
7778
$ngx_addon_dir/ngx_rtmp_flv_live_index_module.c \
7879
$ngx_addon_dir/ngx_rtmp_play_module.c \

ngx_rtmp_live_module.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,9 @@ ngx_rtmp_live_set_status(ngx_rtmp_session_t *s, ngx_chain_t *control,
435435

436436
for (pctx = ctx->stream->ctx; pctx; pctx = pctx->next) {
437437
if (pctx->publishing == 0) {
438+
pctx->session->publisher = s;
439+
438440
if (pctx->protocol == NGX_RTMP_PROTOCOL_HTTP) {
439-
pctx->session->publisher = s;
440441
ngx_http_flv_live_set_status(pctx->session, active);
441442
} else {
442443
ngx_rtmp_live_set_status(pctx->session, control, status,

0 commit comments

Comments
 (0)