vaapi: plugin: Handle when no encoders/decoders available.
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Thu, 11 Aug 2022 19:22:12 +0000 (21:22 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 17 Aug 2022 10:57:37 +0000 (10:57 +0000)
commit664c051d79ef410e8c4767eae2cec3f006cbbf72
treeae04f9c4432d42684a7f64684311d0de9a5990f2
parent73c75479d6bc8ebd64ffe390b36545cdbfb538cf
vaapi: plugin: Handle when no encoders/decoders available.

Nouveau driver currently only exposes postproc entry. But
vaapidecodebin is registered independent if there are decoders or not,
exposing a segmentation fault.

This patch removes the encoder/decoder/codec arrays if no entries are
found, and if no decoders are found vaapidecodebin is not
registered. Also for vaapipostproc if no postproc entry is found.

Also, if general decoder, used by vaapidecodebin, doesn't have a sink
pad string, don't register the glib type.

Fixes: #1349
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2865>
subprojects/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidisplay.c
subprojects/gstreamer-vaapi/gst/vaapi/gstvaapi.c
subprojects/gstreamer-vaapi/gst/vaapi/gstvaapidecode.c