Skip to content

Commit dca4ef0

Browse files
committed
[dev] fix code style flaws.
1 parent 4aad640 commit dca4ef0

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

ngx_rtmp_live_module.c

+13-12
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ ngx_rtmp_live_data(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
11911191
ngx_uint_t peers;
11921192
uint32_t delta;
11931193
ngx_rtmp_live_chunk_stream_t *cs;
1194-
ngx_http_request_t *http_request;
1194+
ngx_http_request_t *r;
11951195
#ifdef NGX_DEBUG
11961196
u_char *msg_type;
11971197

@@ -1265,25 +1265,26 @@ ngx_rtmp_live_data(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
12651265
ss = pctx->session;
12661266
handler = ngx_rtmp_live_proc_handlers[pctx->protocol];
12671267
if (pctx->protocol == NGX_RTMP_PROTOCOL_HTTP) {
1268-
http_request = ss->data;
1269-
if (http_request == NULL || (http_request->connection && http_request->connection->destroyed)) {
1268+
r = ss->data;
1269+
if (r == NULL || (r->connection && r->connection->destroyed)) {
12701270
continue;
12711271
}
1272-
handler->meta = handler->append_message_pt(ss,&ch,NULL,rpkt);
1272+
1273+
handler->meta = handler->append_message_pt(ss, &ch, NULL, rpkt);
12731274
if (handler->meta == NULL) {
12741275
continue;
12751276
}
1276-
if (handler->meta) {
1277-
if (handler->send_message_pt(ss,handler->meta,0) != NGX_OK) {
1278-
++pctx->ndropped;
1279-
cs->dropped += delta;
1280-
handler->free_message_pt(ss, handler->meta);
1281-
handler->meta = NULL;
1282-
continue;
1283-
}
1277+
1278+
if (handler->send_message_pt(ss, handler->meta, 0) != NGX_OK) {
1279+
++pctx->ndropped;
1280+
cs->dropped += delta;
12841281
handler->free_message_pt(ss, handler->meta);
12851282
handler->meta = NULL;
1283+
continue;
12861284
}
1285+
1286+
handler->free_message_pt(ss, handler->meta);
1287+
handler->meta = NULL;
12871288
} else {
12881289
ngx_rtmp_prepare_message(s, &ch, NULL, rpkt);
12891290
if (ngx_rtmp_send_message(ss, rpkt, prio) != NGX_OK) {

0 commit comments

Comments
 (0)