From: He Junyan Date: Fri, 24 Feb 2023 12:15:20 +0000 (+0800) Subject: h265decoder: fail early if no input caps have been provided X-Git-Tag: 1.22.7~454 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=42c145d2adf0353842597a9f2a68aa2fd68516b6;p=platform%2Fupstream%2Fgstreamer.git h265decoder: fail early if no input caps have been provided The h265decoder class does not implement the ->parse() virtual function, and we always need to add the h265parse element before it. So we should set_needs_format of the decoder to TRUE, then if no parse before it, it can fail with a "not-negotiated" error early, rather than go on and generate unexpected error. Part-of: --- diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/codecs/gsth265decoder.c b/subprojects/gst-plugins-bad/gst-libs/gst/codecs/gsth265decoder.c index 4731300..201cc6b 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/codecs/gsth265decoder.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/codecs/gsth265decoder.c @@ -218,6 +218,7 @@ gst_h265_decoder_init (GstH265Decoder * self) GstH265DecoderPrivate *priv; gst_video_decoder_set_packetized (GST_VIDEO_DECODER (self), TRUE); + gst_video_decoder_set_needs_format (GST_VIDEO_DECODER (self), TRUE); self->priv = priv = gst_h265_decoder_get_instance_private (self);