Skip to content

Commit

Permalink
[dev] fix code style flaws.
Browse files Browse the repository at this point in the history
  • Loading branch information
winshining committed Sep 4, 2018
1 parent 4aad640 commit dca4ef0
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions ngx_rtmp_live_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,7 @@ ngx_rtmp_live_data(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
ngx_uint_t peers;
uint32_t delta;
ngx_rtmp_live_chunk_stream_t *cs;
ngx_http_request_t *http_request;
ngx_http_request_t *r;
#ifdef NGX_DEBUG
u_char *msg_type;

Expand Down Expand Up @@ -1265,25 +1265,26 @@ ngx_rtmp_live_data(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
ss = pctx->session;
handler = ngx_rtmp_live_proc_handlers[pctx->protocol];
if (pctx->protocol == NGX_RTMP_PROTOCOL_HTTP) {
http_request = ss->data;
if (http_request == NULL || (http_request->connection && http_request->connection->destroyed)) {
r = ss->data;
if (r == NULL || (r->connection && r->connection->destroyed)) {
continue;
}
handler->meta = handler->append_message_pt(ss,&ch,NULL,rpkt);

handler->meta = handler->append_message_pt(ss, &ch, NULL, rpkt);
if (handler->meta == NULL) {
continue;
}
if (handler->meta) {
if (handler->send_message_pt(ss,handler->meta,0) != NGX_OK) {
++pctx->ndropped;
cs->dropped += delta;
handler->free_message_pt(ss, handler->meta);
handler->meta = NULL;
continue;
}

if (handler->send_message_pt(ss, handler->meta, 0) != NGX_OK) {
++pctx->ndropped;
cs->dropped += delta;
handler->free_message_pt(ss, handler->meta);
handler->meta = NULL;
continue;
}

handler->free_message_pt(ss, handler->meta);
handler->meta = NULL;
} else {
ngx_rtmp_prepare_message(s, &ch, NULL, rpkt);
if (ngx_rtmp_send_message(ss, rpkt, prio) != NGX_OK) {
Expand Down

0 comments on commit dca4ef0

Please sign in to comment.