Skip to content

Commit

Permalink
fix: re-read object_type in case of HE-AAC
Browse files Browse the repository at this point in the history
  • Loading branch information
igorshevach committed Sep 5, 2024
1 parent dd087e6 commit 7a57bf2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions nginx-pckg-module/src/media/codec_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,10 +521,12 @@ codec_config_mp4a_config_parse(
}

return VOD_OK;

error:

vod_log_error(VOD_LOG_ERR, log, 0,
"codec_config_mp4a_config_parse: failed to read all required audio extra data fields");

return VOD_BAD_DATA;
}

Expand Down
6 changes: 4 additions & 2 deletions nginx-pckg-module/src/media/mpegts/adts_encoder_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ adts_encoder_set_media_info(
{
adts_encoder_state_t* state = get_context(context);
mp4a_config_t* codec_config = &media_info->u.audio.codec_config;
request_context_t *request_context = context->request_context;

if (context->request_context->simulation_only)
{
Expand All @@ -43,12 +42,15 @@ adts_encoder_set_media_info(
adts_frame_header_set_channel_configuration(state->header, codec_config->channel_config);
adts_frame_header_set_adts_buffer_fullness(state->header, 0x7ff);

ngx_log_error(NGX_LOG_INFO, request_context->log, 0,
#if (VOD_DEBUG)

ngx_log_error(NGX_LOG_INFO, context->request_context->log, 0,
"adts_encoder_set_media_info: mp4a object_type: %D sample_rate_index: %D channel_config: %D",
codec_config->object_type,
codec_config->sample_rate_index,
codec_config->channel_config);

#endif

return VOD_OK;
}
Expand Down

0 comments on commit 7a57bf2

Please sign in to comment.