Skip to content

Commit 067c737

Browse files
committed
moved notify module to the end of config & added auto_push checks to notifier
1 parent 2ae585d commit 067c737

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ CORE_MODULES="$CORE_MODULES
1111
ngx_rtmp_mp4_module \
1212
ngx_rtmp_record_module \
1313
ngx_rtmp_netcall_module \
14-
ngx_rtmp_notify_module \
1514
ngx_rtmp_relay_module \
1615
ngx_rtmp_exec_module \
1716
ngx_rtmp_codec_module \
1817
ngx_rtmp_auto_push_module \
18+
ngx_rtmp_notify_module \
1919
"
2020

2121

@@ -42,13 +42,13 @@ NGX_ADDON_SRCS="$NGX_ADDON_SRCS \
4242
$ngx_addon_dir/ngx_rtmp_mp4_module.c \
4343
$ngx_addon_dir/ngx_rtmp_record_module.c \
4444
$ngx_addon_dir/ngx_rtmp_netcall_module.c \
45-
$ngx_addon_dir/ngx_rtmp_notify_module.c \
4645
$ngx_addon_dir/ngx_rtmp_stat_module.c \
4746
$ngx_addon_dir/ngx_rtmp_relay_module.c \
4847
$ngx_addon_dir/ngx_rtmp_bandwidth.c \
4948
$ngx_addon_dir/ngx_rtmp_exec_module.c \
5049
$ngx_addon_dir/ngx_rtmp_codec_module.c \
5150
$ngx_addon_dir/ngx_rtmp_auto_push_module.c \
51+
$ngx_addon_dir/ngx_rtmp_notify_module.c \
5252
"
5353
CFLAGS="$CFLAGS -I$ngx_addon_dir"
5454

ngx_rtmp_notify_module.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,10 @@ ngx_rtmp_notify_play(ngx_rtmp_session_t *s, ngx_rtmp_play_t *v)
528528
ngx_rtmp_notify_app_conf_t *nacf;
529529
ngx_rtmp_netcall_init_t ci;
530530

531+
if (s->auto_pushed) {
532+
goto next;
533+
}
534+
531535
nacf = ngx_rtmp_get_module_app_conf(s, ngx_rtmp_notify_module);
532536

533537
if (nacf == NULL) {
@@ -565,6 +569,10 @@ ngx_rtmp_notify_delete_stream(ngx_rtmp_session_t *s, ngx_rtmp_delete_stream_t
565569
ngx_rtmp_notify_ctx_t *ctx;
566570
ngx_rtmp_notify_app_conf_t *nacf;
567571

572+
if (s->auto_pushed) {
573+
goto next;
574+
}
575+
568576
ctx = ngx_rtmp_get_module_ctx(s, ngx_rtmp_notify_module);
569577

570578
if (ctx == NULL) {

0 commit comments

Comments
 (0)