mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
v4l2object: Don't assert when used by the monitor
The monitor sets the object->element object as a GstObject. This works for debug traces, but will assert for ELEMENT_ERROR. This was the only case where that could happen. Add a check for that.
This commit is contained in:
parent
e62bd2f7d8
commit
f0678d73b1
1 changed files with 6 additions and 1 deletions
|
@ -1159,12 +1159,17 @@ gst_v4l2_object_fill_format_list (GstV4l2Object * v4l2object,
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
failed:
|
failed:
|
||||||
{
|
{
|
||||||
|
g_free (format);
|
||||||
|
|
||||||
|
if (!GST_IS_ELEMENT (v4l2object->element))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
GST_ELEMENT_ERROR (v4l2object->element, RESOURCE, SETTINGS,
|
GST_ELEMENT_ERROR (v4l2object->element, RESOURCE, SETTINGS,
|
||||||
(_("Failed to enumerate possible video formats device '%s' can work "
|
(_("Failed to enumerate possible video formats device '%s' can work "
|
||||||
"with"), v4l2object->videodev),
|
"with"), v4l2object->videodev),
|
||||||
("Failed to get number %d in pixelformat enumeration for %s. (%d - %s)",
|
("Failed to get number %d in pixelformat enumeration for %s. (%d - %s)",
|
||||||
n, v4l2object->videodev, errno, g_strerror (errno)));
|
n, v4l2object->videodev, errno, g_strerror (errno)));
|
||||||
g_free (format);
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue