stRefPic =
&sps->short_term_ref_pic_set[slice_hdr->short_term_ref_pic_set_idx];
- g_assert (stRefPic != NULL);
+ if (stRefPic == NULL)
+ return FALSE;
GST_LOG_OBJECT (self,
"NumDeltaPocs: %d, NumNegativePics: %d, NumPositivePics %d",
priv->input_state_changed = FALSE;
}
- gst_h265_decoder_prepare_rps (self, &priv->current_slice,
- priv->current_picture);
+ if (!gst_h265_decoder_prepare_rps (self, &priv->current_slice,
+ priv->current_picture)) {
+ GST_WARNING_OBJECT (self, "Failed to prepare ref pic set");
+ gst_clear_h265_picture (&priv->current_picture);
+ return GST_FLOW_ERROR;
+ }
ret = gst_h265_decoder_dpb_init (self,
&priv->current_slice, priv->current_picture);