codecs: h265decoder: Fix return value if klass->new_picture isn't set
authorBenjamin Gaignard <benjamin.gaignard@collabora.com>
Tue, 7 Dec 2021 16:09:11 +0000 (17:09 +0100)
committerBenjamin Gaignard <benjamin.gaignard@collabora.com>
Wed, 8 Dec 2021 10:02:32 +0000 (11:02 +0100)
If klass->new_picture isn't set we need to initialize
ret with GST_FLOW_OK to avoid unwanted error case

Fixes: 5b405d15858b ("codecs: h265decoder: Use GstFlowReturn everywhere")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1426>

subprojects/gst-plugins-bad/gst-libs/gst/codecs/gsth265decoder.c

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