Fix missing var, check if record have opened file

This commit is contained in:
Sergey Dryabzhinsky 2015-07-05 08:12:33 +03:00
parent dec648681d
commit 4e17054a6d

View file

@ -418,7 +418,7 @@ ngx_rtmp_stat_live(ngx_http_request_t *r, ngx_chain_t ***lll,
ngx_rtmp_record_ctx_t *rctx;
ngx_rtmp_record_rec_ctx_t *recctx;
ngx_rtmp_session_t *s;
ngx_int_t n;
ngx_int_t n, rn;
ngx_uint_t nclients, total_nclients;
u_char buf[NGX_INT_T_LEN];
u_char bbuf[NGX_INT32_LEN];
@ -501,7 +501,7 @@ ngx_rtmp_stat_live(ngx_http_request_t *r, ngx_chain_t ***lll,
if (rctx) {
recctx = rctx->rec.elts;
for (rn = 0; rn < rctx->rec.nelts; ++rn, ++recctx) {
if (recctx->initialized) {
if (recctx->initialized && recctx->file.fd != NGX_INVALID_FILE) {
NGX_RTMP_STAT_L("<recording/>");
is_recording = 1;
break;