@@ -563,28 +563,28 @@ ngx_rtmp_live_join(ngx_rtmp_session_t *s, u_char *name, unsigned publisher)
563
563
}
564
564
565
565
566
- static void
567
- ngx_rtmp_live_leave (ngx_rtmp_session_t * s )
566
+ static ngx_int_t
567
+ ngx_rtmp_live_close_stream (ngx_rtmp_session_t * s , ngx_rtmp_close_stream_t * v )
568
568
{
569
- ngx_rtmp_session_t * ss ;
570
- ngx_rtmp_live_ctx_t * ctx , * * cctx , * pctx ;
571
- ngx_rtmp_live_stream_t * * stream ;
572
- ngx_rtmp_live_app_conf_t * lacf ;
569
+ ngx_rtmp_session_t * ss ;
570
+ ngx_rtmp_live_ctx_t * ctx , * * cctx , * pctx ;
571
+ ngx_rtmp_live_stream_t * * stream ;
572
+ ngx_rtmp_live_app_conf_t * lacf ;
573
573
574
574
lacf = ngx_rtmp_get_module_app_conf (s , ngx_rtmp_live_module );
575
575
if (lacf == NULL ) {
576
- return ;
576
+ goto next ;
577
577
}
578
578
579
579
ctx = ngx_rtmp_get_module_ctx (s , ngx_rtmp_live_module );
580
580
if (ctx == NULL ) {
581
- return ;
581
+ goto next ;
582
582
}
583
583
584
584
if (ctx -> stream == NULL ) {
585
585
ngx_log_debug0 (NGX_LOG_DEBUG_RTMP , s -> connection -> log , 0 ,
586
- "live: leave: not joined" );
587
- return ;
586
+ "live: not joined" );
587
+ goto next ;
588
588
}
589
589
590
590
ngx_log_debug1 (NGX_LOG_DEBUG_RTMP , s -> connection -> log , 0 ,
@@ -622,7 +622,7 @@ ngx_rtmp_live_leave(ngx_rtmp_session_t *s)
622
622
623
623
if (ctx -> stream -> ctx ) {
624
624
ctx -> stream = NULL ;
625
- return ;
625
+ goto next ;
626
626
}
627
627
628
628
ngx_log_debug1 (NGX_LOG_DEBUG_RTMP , s -> connection -> log , 0 ,
@@ -631,7 +631,7 @@ ngx_rtmp_live_leave(ngx_rtmp_session_t *s)
631
631
632
632
stream = ngx_rtmp_live_get_stream (s , ctx -> stream -> name , 0 );
633
633
if (stream == NULL ) {
634
- return ;
634
+ goto next ;
635
635
}
636
636
* stream = (* stream )-> next ;
637
637
@@ -643,15 +643,7 @@ ngx_rtmp_live_leave(ngx_rtmp_session_t *s)
643
643
ngx_rtmp_send_status (s , "NetStream.Play.Stop" , "status" , "Stop live" );
644
644
}
645
645
646
- return ;
647
- }
648
-
649
-
650
- static ngx_int_t
651
- ngx_rtmp_live_close_stream (ngx_rtmp_session_t * s , ngx_rtmp_close_stream_t * v )
652
- {
653
- ngx_rtmp_live_leave (s );
654
-
646
+ next :
655
647
return next_close_stream (s , v );
656
648
}
657
649
@@ -1121,27 +1113,6 @@ ngx_rtmp_live_play(ngx_rtmp_session_t *s, ngx_rtmp_play_t *v)
1121
1113
}
1122
1114
1123
1115
1124
- ngx_int_t
1125
- ngx_rtmp_live_redirect (ngx_rtmp_session_t * s , u_char * name )
1126
- {
1127
- ngx_uint_t publishing ;
1128
- ngx_rtmp_live_ctx_t * ctx ;
1129
-
1130
- ctx = ngx_rtmp_get_module_ctx (s , ngx_rtmp_live_module );
1131
- if (ctx == NULL ) {
1132
- return NGX_ERROR ;
1133
- }
1134
-
1135
- publishing = ctx -> publishing ;
1136
-
1137
- ngx_rtmp_live_leave (s );
1138
-
1139
- ngx_rtmp_live_join (s , name , publishing );
1140
-
1141
- return NGX_OK ;
1142
- }
1143
-
1144
-
1145
1116
static ngx_int_t
1146
1117
ngx_rtmp_live_postconfiguration (ngx_conf_t * cf )
1147
1118
{
0 commit comments