codecs: h265decoder: Fix return value if klass->new_picture isn't set

If klass->new_picture isn't set we need to initialize
ret with GST_FLOW_OK to avoid unwanted error case

Fixes: 5b405d1585 ("codecs: h265decoder: Use GstFlowReturn everywhere")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1426>
This commit is contained in:
Benjamin Gaignard 2021-12-07 17:09:11 +01:00
parent 779e715b6c
commit 4ff27314f6

View file

@ -680,7 +680,7 @@ gst_h265_decoder_parse_slice (GstH265Decoder * self, GstH265NalUnit * nalu,
if (!priv->current_picture) { if (!priv->current_picture) {
GstH265DecoderClass *klass = GST_H265_DECODER_GET_CLASS (self); GstH265DecoderClass *klass = GST_H265_DECODER_GET_CLASS (self);
GstH265Picture *picture; GstH265Picture *picture;
gboolean ret = TRUE; GstFlowReturn ret = GST_FLOW_OK;
g_assert (priv->current_frame); g_assert (priv->current_frame);