h265decoder: fail early if no input caps have been provided
authorHe Junyan <junyan.he@intel.com>
Fri, 24 Feb 2023 12:15:20 +0000 (20:15 +0800)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sat, 25 Feb 2023 10:54:49 +0000 (10:54 +0000)
commit42c145d2adf0353842597a9f2a68aa2fd68516b6
tree45329a92ff9dd2d1090dcaa73216f071f6db2a48
parent087ebe74ad0a8e77c5cdb56c23ab9af40a0aa6b4
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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4066>
subprojects/gst-plugins-bad/gst-libs/gst/codecs/gsth265decoder.c