From 1d421c85f45af8a1944a96e8a5adee5d25d665e4 Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Wed, 20 Nov 2013 17:12:35 +0400 Subject: [PATCH] fixed idle_stream off --- ngx_rtmp_live_module.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/ngx_rtmp_live_module.c b/ngx_rtmp_live_module.c index fa5590b..4f777c3 100644 --- a/ngx_rtmp_live_module.c +++ b/ngx_rtmp_live_module.c @@ -608,15 +608,14 @@ ngx_rtmp_live_close_stream(ngx_rtmp_session_t *s, ngx_rtmp_close_stream_t *v) if (ctx->publishing) { ngx_rtmp_send_status(s, "NetStream.Unpublish.Success", "status", "Stop publishing"); - } - - if (!lacf->idle_streams) { - for (pctx = ctx->stream->ctx; pctx; pctx = pctx->next) { - if (pctx->publishing == 0) { - ss = pctx->session; - ngx_log_debug0(NGX_LOG_DEBUG_RTMP, ss->connection->log, 0, - "live: no publisher"); - ngx_rtmp_finalize_session(ss); + if (!lacf->idle_streams) { + for (pctx = ctx->stream->ctx; pctx; pctx = pctx->next) { + if (pctx->publishing == 0) { + ss = pctx->session; + ngx_log_debug0(NGX_LOG_DEBUG_RTMP, ss->connection->log, 0, + "live: no publisher"); + ngx_rtmp_finalize_session(ss); + } } } }