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

The vp8decoder class does not implement the ->parse() virtual function,
it can only accepts frame aligned data. If some element such as filesrc
feed it with unaligned data, the behaviour is undecided. So we should
set_needs_format of the decoder to TRUE, then 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/gstvp8decoder.c