av1decoder: fail early if no input caps have been provided
authorHe Junyan <junyan.he@intel.com>
Fri, 24 Feb 2023 13:49:27 +0000 (21:49 +0800)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sat, 25 Feb 2023 10:54:49 +0000 (10:54 +0000)
commitf188e06d54b0b84dbdad7baa4245b456533eafff
tree5133ced40ba2ba1b0ca491cb55b928f816362259
parentdb70f58faa1ca7431d2ce7e7760ad1bb8dd9fdcd
av1decoder: fail early if no input caps have been provided

The av1decoder class does not implement the ->parse() virtual function,
and we always need to add the av1parse 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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4066>
subprojects/gst-plugins-bad/gst-libs/gst/codecs/gstav1decoder.c