mirror of
https://github.com/zotanmew/nginx-rtmp-module.git
synced 2024-05-11 06:41:08 +02:00
fixed static code analysis errors; thanks to @pgbi
This commit is contained in:
parent
6db8ab7963
commit
e28dfad05c
|
@ -453,7 +453,7 @@ ngx_rtmp_core_application(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||
cscf = pctx->srv_conf[ngx_rtmp_core_module.ctx_index];
|
||||
|
||||
cacfp = ngx_array_push(&cscf->applications);
|
||||
if (cacf == NULL) {
|
||||
if (cacfp == NULL) {
|
||||
return NGX_CONF_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
@ -118,14 +118,16 @@ ngx_rtmp_init_connection(ngx_connection_t *c)
|
|||
c->number, &c->addr_text);
|
||||
|
||||
s = ngx_rtmp_init_session(c, addr_conf);
|
||||
if (s == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* only auto-pushed connections are
|
||||
* done through unix socket */
|
||||
|
||||
s->auto_pushed = unix_socket;
|
||||
|
||||
if (s) {
|
||||
ngx_rtmp_handshake(s);
|
||||
}
|
||||
ngx_rtmp_handshake(s);
|
||||
}
|
||||
|
||||
|
||||
|
@ -264,27 +266,25 @@ ngx_rtmp_close_session_handler(ngx_event_t *e)
|
|||
|
||||
ngx_log_debug0(NGX_LOG_DEBUG_RTMP, c->log, 0, "close session");
|
||||
|
||||
if (s) {
|
||||
ngx_rtmp_fire_event(s, NGX_RTMP_DISCONNECT, NULL, NULL);
|
||||
ngx_rtmp_fire_event(s, NGX_RTMP_DISCONNECT, NULL, NULL);
|
||||
|
||||
if (s->ping_evt.timer_set) {
|
||||
ngx_del_timer(&s->ping_evt);
|
||||
}
|
||||
if (s->ping_evt.timer_set) {
|
||||
ngx_del_timer(&s->ping_evt);
|
||||
}
|
||||
|
||||
if (s->in_old_pool) {
|
||||
ngx_destroy_pool(s->in_old_pool);
|
||||
}
|
||||
if (s->in_old_pool) {
|
||||
ngx_destroy_pool(s->in_old_pool);
|
||||
}
|
||||
|
||||
if (s->in_pool) {
|
||||
ngx_destroy_pool(s->in_pool);
|
||||
}
|
||||
if (s->in_pool) {
|
||||
ngx_destroy_pool(s->in_pool);
|
||||
}
|
||||
|
||||
ngx_rtmp_free_handshake_buffers(s);
|
||||
ngx_rtmp_free_handshake_buffers(s);
|
||||
|
||||
while (s->out_pos != s->out_last) {
|
||||
ngx_rtmp_free_shared_chain(cscf, s->out[s->out_pos++]);
|
||||
s->out_pos %= s->out_queue;
|
||||
}
|
||||
while (s->out_pos != s->out_last) {
|
||||
ngx_rtmp_free_shared_chain(cscf, s->out[s->out_pos++]);
|
||||
s->out_pos %= s->out_queue;
|
||||
}
|
||||
|
||||
ngx_rtmp_close_connection(c);
|
||||
|
|
|
@ -1026,7 +1026,7 @@ ngx_rtmp_record_node_av(ngx_rtmp_session_t *s, ngx_rtmp_record_rec_ctx_t *rctx,
|
|||
}
|
||||
|
||||
if (ngx_rtmp_get_video_frame_type(in) == NGX_RTMP_VIDEO_KEY_FRAME &&
|
||||
(codec_ctx->video_codec_id != NGX_RTMP_VIDEO_H264 ||
|
||||
((codec_ctx && codec_ctx->video_codec_id != NGX_RTMP_VIDEO_H264) ||
|
||||
!ngx_rtmp_is_codec_header(in)))
|
||||
{
|
||||
rctx->video_key_sent = 1;
|
||||
|
|
Loading…
Reference in a new issue