From db70f58faa1ca7431d2ce7e7760ad1bb8dd9fdcd Mon Sep 17 00:00:00 2001 From: He Junyan Date: Fri, 24 Feb 2023 21:38:48 +0800 Subject: [PATCH] vp9decoder: fail early if no input caps have been provided The vp9decoder class does not implement the ->parse() virtual function, and we always need to add the vp9parse 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: --- subprojects/gst-plugins-bad/gst-libs/gst/codecs/gstvp9decoder.c | 1 + 1 file changed, 1 insertion(+) diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/codecs/gstvp9decoder.c b/subprojects/gst-plugins-bad/gst-libs/gst/codecs/gstvp9decoder.c index 1740e75..3743367 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/codecs/gstvp9decoder.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/codecs/gstvp9decoder.c @@ -140,6 +140,7 @@ static void gst_vp9_decoder_init (GstVp9Decoder * self) { gst_video_decoder_set_packetized (GST_VIDEO_DECODER (self), TRUE); + gst_video_decoder_set_needs_format (GST_VIDEO_DECODER (self), TRUE); self->priv = gst_vp9_decoder_get_instance_private (self); -- 2.7.4