v4l2: fix crash on invalid caps

gst_v4l2_object_set_format_full() was returning FALSE without setting
an error. Caller code (gst_v4l2src_fixate()) was then derefing a
NULL pointer when trying to handle the error.
This commit is contained in:
Guillaume Desmottes 2020-02-05 12:00:00 +05:30
parent f6e383b749
commit 0f907205de

View file

@ -3784,6 +3784,9 @@ invalid_caps:
{
GST_DEBUG_OBJECT (v4l2object->dbg_obj, "can't parse caps %" GST_PTR_FORMAT,
caps);
GST_V4L2_ERROR (error, RESOURCE, SETTINGS,
(_("Invalid caps")), ("Can't parse caps %" GST_PTR_FORMAT, caps));
return FALSE;
}
try_fmt_failed: