Skip to content

Commit

Permalink
Handles additional bits in EXT_ELE_PROD_METADATA (#81)
Browse files Browse the repository at this point in the history
Significance:
--------------
- Handles the additiona bits (if present) in the extension element
  production metadata payload
- Issue was uncovered in #80

Tests:
------
- Conformance testing on x86, x64 builds

Co-authored-by: Saketh Sathuvalli <[email protected]>
  • Loading branch information
SakethSathuvalli and Saketh Sathuvalli authored Jun 6, 2024
1 parent a52c416 commit 604fec5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions decoder/ia_core_coder_init_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,22 @@ IA_ERRORCODE ia_core_coder_ext_element_config(
{
case ID_EXT_ELE_PROD_METADATA:
{
cnt_bits = it_bit_buff->cnt_bits;
err_code = impeghd_prod_metadata_config(it_bit_buff, pstr_usac_conf);
if (err_code)
{
return err_code;
}
cnt_bits = (cnt_bits - it_bit_buff->cnt_bits);
if (cnt_bits > (WORD32)(usac_ext_element_config_length << 3))
{
return IA_MPEGH_DEC_EXE_FATAL_DECODE_FRAME_ERROR;
}
else if (cnt_bits < (WORD32)(usac_ext_element_config_length << 3))
{
skip_bits = (usac_ext_element_config_length << 3) - cnt_bits;
ia_core_coder_skip_bits_buf(it_bit_buff, skip_bits);
}
break;
}
case ID_MPEGH_EXT_ELE_ENHANCED_OBJ_METADATA:
Expand Down

0 comments on commit 604fec5

Please sign in to comment.