Merge "Decoder: Add missing error checks for parsing sps or pps" into qt-dev
This commit is contained in:
commit
a09be99800
2 changed files with 7 additions and 7 deletions
|
|
@ -2432,16 +2432,10 @@ WORD32 ih264d_video_decode(iv_obj_t *dec_hdl, void *pv_api_ip, void *pv_api_op)
|
|||
}
|
||||
|
||||
//Report if header (sps and pps) has not been decoded yet
|
||||
if(ps_dec->i4_header_decoded != 3)
|
||||
{
|
||||
ps_dec_op->u4_error_code |= (1 << IVD_INSUFFICIENTDATA);
|
||||
|
||||
}
|
||||
|
||||
if(ps_dec->i4_decode_header == 1 && ps_dec->i4_header_decoded != 3)
|
||||
{
|
||||
ps_dec_op->u4_error_code |= (1 << IVD_INSUFFICIENTDATA);
|
||||
|
||||
api_ret_value = IV_FAIL;
|
||||
}
|
||||
if(ps_dec->u4_prev_nal_skipped)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -205,6 +205,9 @@ WORD32 ih264d_parse_pps(dec_struct_t * ps_dec, dec_bit_stream_t * ps_bitstrm)
|
|||
UWORD8 u1_more_data_flag;
|
||||
WORD32 i4_i;
|
||||
|
||||
if(!(ps_dec->i4_header_decoded & 1))
|
||||
return ERROR_INV_SPS_PPS_T;
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
/* Decode pic_parameter_set_id and find corresponding pic params */
|
||||
/*--------------------------------------------------------------------*/
|
||||
|
|
@ -230,6 +233,9 @@ WORD32 ih264d_parse_pps(dec_struct_t * ps_dec, dec_bit_stream_t * ps_bitstrm)
|
|||
return ERROR_INV_SPS_PPS_T;
|
||||
COPYTHECONTEXT("PPS: seq_parameter_set_id",u4_temp);
|
||||
ps_sps = &ps_dec->ps_sps[u4_temp];
|
||||
|
||||
if(FALSE == ps_sps->u1_is_valid)
|
||||
return ERROR_INV_SPS_PPS_T;
|
||||
ps_pps->ps_sps = ps_sps;
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue