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:
parent
692d4a3a16
commit
ca125bd304
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user