v4l2: use errno

This commit is contained in:
Wim Taymans 2011-07-13 11:40:11 +01:00
parent 6d97bfc41f
commit c83730fc11

View file

@ -2072,7 +2072,6 @@ gst_v4l2_object_set_format (GstV4l2Object * v4l2object, GstCaps * caps)
struct v4l2_streamparm *streamparm;
enum v4l2_field field;
guint32 pixelformat;
gint ret;
gint width, height;
gboolean interlaced;
struct v4l2_fmtdesc *fmtdesc;
@ -2161,7 +2160,7 @@ gst_v4l2_object_set_format (GstV4l2Object * v4l2object, GstCaps * caps)
memset (streamparm, 0x00, sizeof (struct v4l2_streamparm));
streamparm->type = v4l2object->type;
if ((ret = v4l2_ioctl (fd, VIDIOC_G_PARM, streamparm)) < 0)
if (v4l2_ioctl (fd, VIDIOC_G_PARM, streamparm) < 0)
goto get_parm_failed;
if (v4l2object->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) {
@ -2256,7 +2255,7 @@ invalid_pixelformat:
get_parm_failed:
{
/* it's possible that this call is not supported */
if (ret != EINVAL) {
if (errno != EINVAL) {
GST_ELEMENT_WARNING (v4l2object->element, RESOURCE, SETTINGS,
(_("Could not get parameters on device '%s'"),
v4l2object->videodev), GST_ERROR_SYSTEM);