From c626afd60aa3de44cfdad97dcc42f7b89819fb7f Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Fri, 1 Oct 2004 10:02:42 +0000 Subject: [PATCH] sys/v4l/v4lsrc_calls.c: Don't actually error out if we get another return value than Original commit message from CVS: * sys/v4l/v4lsrc_calls.c: (gst_v4lsrc_try_capture): Don't actually error out if we get another return value than -EINVAL. Opposite to what I first thought, drivers have random return values for this, although -EINVAL is the expected return value. Since this is not fatal, we shouldn't use GST_ELEMENT_ERROR() but just GST_ERROR_OBJECT(). --- ChangeLog | 9 +++++++++ sys/v4l/v4lsrc_calls.c | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7e15ebf322..a615b83d96 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-10-01 Ronald S. Bultje + + * sys/v4l/v4lsrc_calls.c: (gst_v4lsrc_try_capture): + Don't actually error out if we get another return value than + -EINVAL. Opposite to what I first thought, drivers have random + return values for this, although -EINVAL is the expected return + value. Since this is not fatal, we shouldn't use + GST_ELEMENT_ERROR() but just GST_ERROR_OBJECT(). + 2004-10-01 Ronald S. Bultje * ext/dvdread/dvdreadsrc.c: (dvdreadsrc_class_init), diff --git a/sys/v4l/v4lsrc_calls.c b/sys/v4l/v4lsrc_calls.c index e8001ed92b..ad89f109bf 100644 --- a/sys/v4l/v4lsrc_calls.c +++ b/sys/v4l/v4lsrc_calls.c @@ -494,8 +494,8 @@ gst_v4lsrc_try_capture (GstV4lSrc * v4lsrc, gint width, gint height, vmmap.frame = frame; if (ioctl (GST_V4LELEMENT (v4lsrc)->video_fd, VIDIOCMCAPTURE, &vmmap) < 0) { if (errno != EINVAL) /* our format failed! */ - GST_ELEMENT_ERROR (v4lsrc, RESOURCE, OPEN_READ_WRITE, (NULL), - ("Error queueing our try-out buffer: %s", g_strerror (errno))); + GST_ERROR_OBJECT (v4lsrc, + "Error queueing our try-out buffer: %s", g_strerror (errno)); munmap (buffer, vmbuf.size); return FALSE; }