diff --git a/nginx-kmp-out-module/src/ngx_kmp_out_track.c b/nginx-kmp-out-module/src/ngx_kmp_out_track.c index fa249e0..c5408fb 100644 --- a/nginx-kmp-out-module/src/ngx_kmp_out_track.c +++ b/nginx-kmp-out-module/src/ngx_kmp_out_track.c @@ -1209,22 +1209,22 @@ ngx_kmp_out_track_write(ngx_kmp_out_track_t *track, u_char *data, return ngx_kmp_out_track_write_chain(track, &in, data); } + static ngx_int_t ngx_kmp_out_track_log_media_info(ngx_kmp_out_track_t *track) { - u_char *buf = NULL, - *p; + u_char *buf = NULL, *p; if(track->extra_data.len > 0) { buf = ngx_pnalloc(track->pool, 2 * track->extra_data.len + 1); - if(!buf) + if(buf == NULL) { - ngx_log_error(NGX_LOG_ERR, &track->log, 0, - "ngx_kmp_out_track_log_media_info:" - "failed to allocate buffer for extra data size %uD", - 2 * track->extra_data.len + 1); - return NGX_ERROR; + ngx_log_error(NGX_LOG_ERR, &track->log, 0, + "ngx_kmp_out_track_log_media_info:" + "failed to allocate buffer for extra data size %uD", + 2 * track->extra_data.len + 1); + return NGX_ERROR; } p = ngx_hex_dump(buf, track->extra_data.data, track->extra_data.len); @@ -1232,12 +1232,12 @@ ngx_kmp_out_track_log_media_info(ngx_kmp_out_track_t *track) } ngx_log_error(NGX_LOG_INFO, &track->log, 0, - "ngx_kmp_out_track_log_media_info:" - " media_type: %uD codec_id: %uD" - " timescale: %uD bitrate: %uD" - " extra_data: %s", - track->media_info.media_type, track->media_info.codec_id, - track->media_info.timescale, track->media_info.bitrate, buf); + "ngx_kmp_out_track_log_media_info:" + " media_type: %uD codec_id: %uD" + " timescale: %uD bitrate: %uD" + " extra_data: %s", + track->media_info.media_type, track->media_info.codec_id, + track->media_info.timescale, track->media_info.bitrate, buf); switch(track->media_info.media_type) { case KMP_MEDIA_VIDEO: @@ -1252,8 +1252,8 @@ ngx_kmp_out_track_log_media_info(ngx_kmp_out_track_t *track) ngx_log_error(NGX_LOG_INFO, &track->log, 0, "ngx_kmp_out_track_log_media_info: audio" " channels: %uD bits_per_sample: %uD sample_rate: %uD channel_layout: %uD", - track->media_info.u.audio.channels, track->media_info.u.audio.bits_per_sample, - track->media_info.u.audio.sample_rate, track->media_info.u.audio.channel_layout); + track->media_info.u.audio.channels, track->media_info.u.audio.bits_per_sample, + track->media_info.u.audio.sample_rate, track->media_info.u.audio.channel_layout); break; };