From 2d1b42029af8c75e3539c11314f818b61c6e6a8e Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Mon, 19 Feb 2007 12:22:43 +0000 Subject: [PATCH] sys/v4l2/v4l2src_calls.c: Readd GST_ELEMENT_ERROR if we can't reenque buffers after EIO, fixes #407369 Original commit message from CVS: * sys/v4l2/v4l2src_calls.c: (gst_v4l2src_fill_format_list), (gst_v4l2src_grab_frame), (gst_v4l2src_set_capture), (gst_v4l2src_capture_init): Readd GST_ELEMENT_ERROR if we can't reenque buffers after EIO, fixes #407369 --- ChangeLog | 8 ++++++++ sys/v4l2/v4l2src_calls.c | 13 ++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 65c1fe5ad2..ee7ba4b1dd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-02-19 Stefan Kost + + * sys/v4l2/v4l2src_calls.c: (gst_v4l2src_fill_format_list), + (gst_v4l2src_grab_frame), (gst_v4l2src_set_capture), + (gst_v4l2src_capture_init): + Readd GST_ELEMENT_ERROR if we can't reenque buffers after EIO, + fixes #407369 + 2007-02-18 Wim Taymans * gst/rtp/Makefile.am: diff --git a/sys/v4l2/v4l2src_calls.c b/sys/v4l2/v4l2src_calls.c index fd956aeb4d..7eef5471cb 100644 --- a/sys/v4l2/v4l2src_calls.c +++ b/sys/v4l2/v4l2src_calls.c @@ -194,9 +194,7 @@ gst_v4l2src_grab_frame (GstV4l2Src * v4l2src) */ GST_DEBUG_OBJECT (v4l2src, "reenqueing buffer"); if (ioctl (v4l2src->v4l2object->video_fd, VIDIOC_QBUF, &buffer) < 0) { - GST_WARNING_OBJECT (v4l2src, - "Error queueing buffer on device %s. system error: %s", - v4l2src->v4l2object->videodev, g_strerror (errno)); + goto qbuf_failed; } /*} */ } @@ -255,6 +253,15 @@ too_many_trials: NUM_TRIALS, v4l2src->v4l2object->videodev, g_strerror (errno))); return -1; } +qbuf_failed: + { + GST_ELEMENT_ERROR (v4l2src, RESOURCE, WRITE, + (_("Could not exchange data with device '%s'."), + v4l2src->v4l2object->videodev), + ("Error queueing buffer on device %s. system error: %s", + v4l2src->v4l2object->videodev, g_strerror (errno))); + return -1; + } }