libs: decoder: h265: parser state after update dependent slice

If the dependent_slice_segment_flag is true, most slice info derived from last slice.
So we need check the slice type after we call populate_dependent_slice_hdr
This commit is contained in:
Xu Guangxin 2020-03-03 15:24:32 +08:00
parent a8031bcb0e
commit bf2299279f

View file

@ -1474,8 +1474,6 @@ parse_slice (GstVaapiDecoderH265 * decoder, GstVaapiDecoderUnit * unit)
return get_status (result);
priv->parser_state |= GST_H265_VIDEO_STATE_GOT_SLICE;
if (!GST_H265_IS_I_SLICE (slice_hdr))
priv->parser_state |= GST_H265_VIDEO_STATE_GOT_P_SLICE;
return GST_VAAPI_DECODER_STATUS_SUCCESS;
}
@ -3147,6 +3145,8 @@ gst_vaapi_decoder_h265_parse (GstVaapiDecoder * base_decoder,
pi);
else
populate_dependent_slice_hdr (pi, priv->prev_independent_slice_pi);
if (!GST_H265_IS_I_SLICE (&pi->data.slice_hdr))
priv->parser_state |= GST_H265_VIDEO_STATE_GOT_P_SLICE;
break;
default:
/* Fix */