msdk: Add return when creating caps fails for VPP

When creating caps fails, the function should return immediately
and should not continue to register the plugin.

This patch fixes the issue of "gst_mini_object_ref: assertion
'mini_object != NULL' failed" in
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2506

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4466>
This commit is contained in:
Yinhang Liu 2023-04-21 10:19:32 +08:00 committed by GStreamer Marge Bot
parent 692d4a3a16
commit ca125bd304

View file

@ -272,6 +272,7 @@ _register_vpp (GstPlugin * plugin,
if (!gst_msdkcaps_vpp_create_caps (context, vpp_desc, &sink_caps, &src_caps)) {
GST_WARNING ("Failed to create caps for VPP");
return;
}
if (!gst_msdkvpp_register (plugin,
@ -373,6 +374,7 @@ _register_vpp (GstPlugin * plugin, GstMsdkContext * context)
if (!gst_msdkcaps_vpp_create_caps (context, NULL, &sink_caps, &src_caps)) {
GST_WARNING ("Failed to create caps for VPP");
return;
}
if (!gst_msdkvpp_register (plugin, context,