moved NetStream.Unpublish.Success to a better place

This commit is contained in:
Roman Arutyunyan 2013-08-01 15:23:12 +04:00
parent c11b916501
commit a3cffbb6c2

View file

@ -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);
}