This patch verifies if the function returns NULL in the caller.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2899>
if (gst_va_decoder_is_open (self)) {
srcpad_caps = gst_va_create_raw_caps_from_config (self->display,
self->config);
+ if (!srcpad_caps) {
+ GST_WARNING_OBJECT (self, "Invalid configuration caps");
+ return NULL;
+ }
gst_caps_replace (&self->srcpad_caps, srcpad_caps);
gst_caps_unref (srcpad_caps);
if (gst_va_encoder_is_open (self)) {
sinkpad_caps = gst_va_create_raw_caps_from_config (self->display,
self->config);
+ if (!sinkpad_caps) {
+ GST_WARNING_OBJECT (self, "Invalid configuration caps");
+ return NULL;
+ }
gst_caps_replace (&self->sinkpad_caps, sinkpad_caps);
gst_caps_unref (sinkpad_caps);