Merge "decoder: Return error if first slice decoded in a frame is dependent slice" into qt-qpr1-dev

This commit is contained in:
TreeHugger Robot 2020-03-20 02:54:35 +00:00 • committed by Android (Google) Code Review
commit bab21d5cb9

View file

@ -325,6 +325,12 @@ IHEVCD_ERROR_T ihevcd_parse_slice_header(codec_t *ps_codec,
{
BITS_PARSE("dependent_slice_flag", value, ps_bitstrm, 1);
/* First slice to be decoded in the current picture can't be dependent slice */
if (value && 0 == ps_codec->i4_pic_present)
{
return IHEVCD_IGNORE_SLICE;
}
/* If dependendent slice, copy slice header from previous slice */
if(value && (ps_codec->s_parse.i4_cur_slice_idx > 0))
{