Skip to content

Commit

Permalink
code style
Browse files Browse the repository at this point in the history
  • Loading branch information
igorshevach committed Sep 17, 2024
1 parent 12731f2 commit e911997
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions nginx-kmp-out-module/src/ngx_kmp_out_track.c
Original file line number Diff line number Diff line change
Expand Up @@ -1209,35 +1209,35 @@ 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);
*p = 0;
}

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:
Expand All @@ -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;
};

Expand Down

0 comments on commit e911997

Please sign in to comment.