Decoder: Fix in checking for valid profile flags am: d7eee555dc am: 637cb7f434 am: 3735b426ae am: 4b8b6ff6cb am: 5c225e8959 am: f30749947b am: 70221f5df2

am: 5d6b36a138

Change-Id: Ia2c22b37cd51adeb969266b8c8c1188da6b70a92
This commit is contained in:
Harish Mahendrakar 2016-12-08 00:45:04 +00:00 committed by android-build-merger
commit 4981f232bb
2 changed files with 8 additions and 11 deletions

View file

@ -257,6 +257,7 @@ enum
/** Profile Types*/
#define BASE_PROFILE_IDC 66
#define MAIN_PROFILE_IDC 77
#define EXTENDED_PROFILE_IDC 88
#define HIGH_PROFILE_IDC 100

View file

@ -533,18 +533,14 @@ WORD32 ih264d_parse_sps(dec_struct_t *ps_dec, dec_bit_stream_t *ps_bitstrm)
)
{
if((uc_constraint_set1_flag != 1) && (uc_constraint_set0_flag != 1))
/* Apart from Baseline, main and high profile,
* only extended profile is supported provided
* uc_constraint_set0_flag or uc_constraint_set1_flag are set to 1
*/
if((u1_profile_idc != EXTENDED_PROFILE_IDC) ||
((uc_constraint_set1_flag != 1) && (uc_constraint_set0_flag != 1)))
{
if(NULL != ps_dec)
{
UWORD32 i4_error_code;
i4_error_code = ERROR_FEATURE_UNAVAIL;
return i4_error_code;
}
else
{
return (ERROR_FEATURE_UNAVAIL);
}
return (ERROR_FEATURE_UNAVAIL);
}
}