mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-05 09:00:54 +00:00
h265decoder: Do not abort when failed to prepare ref pic set
Currently the element calls abort when failed to prepare reference picture set. This can happent when the input stream is somehow corrupted, like a rtsp strem with lost packets. Now it will only return with GST_FLOW_ERROR instead of terminating whole process. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3542>
This commit is contained in:
parent
7f093a779a
commit
14f6dbc39a
1 changed files with 8 additions and 3 deletions
|
@ -1382,7 +1382,8 @@ gst_h265_decoder_prepare_rps (GstH265Decoder * self, const GstH265Slice * slice,
|
|||
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",
|
||||
|
@ -1634,8 +1635,12 @@ gst_h265_decoder_start_current_picture (GstH265Decoder * self)
|
|||
return GST_FLOW_OK;
|
||||
}
|
||||
|
||||
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_h265_picture_clear (&priv->current_picture);
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
|
||||
ret = gst_h265_decoder_dpb_init (self,
|
||||
&priv->current_slice, priv->current_picture);
|
||||
|
|
Loading…
Reference in a new issue