From a3cffbb6c213d96a505cb35b1b14975b68e384f9 Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Thu, 1 Aug 2013 15:23:12 +0400 Subject: [PATCH] moved NetStream.Unpublish.Success to a better place --- ngx_rtmp_live_module.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ngx_rtmp_live_module.c b/ngx_rtmp_live_module.c index 8258e47..9dfbd30 100644 --- a/ngx_rtmp_live_module.c +++ b/ngx_rtmp_live_module.c @@ -592,6 +592,11 @@ ngx_rtmp_live_close_stream(ngx_rtmp_session_t *s, ngx_rtmp_close_stream_t *v) ngx_rtmp_live_stop(s); } + if (ctx->publishing) { + ngx_rtmp_send_status(s, "NetStream.Unpublish.Success", + "status", "Stop publishing"); + } + if (ctx->stream->ctx) { ctx->stream = NULL; goto next; @@ -615,11 +620,6 @@ ngx_rtmp_live_close_stream(ngx_rtmp_session_t *s, ngx_rtmp_close_stream_t *v) ngx_rtmp_send_status(s, "NetStream.Play.Stop", "status", "Stop live"); } - if (ctx->publishing) { - ngx_rtmp_send_status(s, "NetStream.Unpublish.Success", - "status", "Stop publishing"); - } - next: return next_close_stream(s, v); }