From: Hans Verkuil Date: Tue, 25 Feb 2014 19:13:12 +0000 (+0100) Subject: qv4l2: ignore buffers with flag V4L2_BUF_FLAG_ERROR. X-Git-Tag: v4l-utils-1.2.0~177 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=84c8d337f0ad6a43bdde5965c6337434e0b7c213;p=platform%2Fupstream%2Fv4l-utils.git qv4l2: ignore buffers with flag V4L2_BUF_FLAG_ERROR. Such buffers should just be requeued. Signed-off-by: Hans Verkuil --- diff --git a/utils/qv4l2/qv4l2.cpp b/utils/qv4l2/qv4l2.cpp index 0ace458..86a3e6d 100644 --- a/utils/qv4l2/qv4l2.cpp +++ b/utils/qv4l2/qv4l2.cpp @@ -396,6 +396,10 @@ void ApplicationWindow::capVbiFrame() } if (again) return; + if (buf.flags & V4L2_BUF_FLAG_ERROR) { + qbuf(buf); + return; + } data = (__u8 *)m_buffers[buf.index].start; s = buf.bytesused; break; @@ -408,6 +412,10 @@ void ApplicationWindow::capVbiFrame() } if (again) return; + if (buf.flags & V4L2_BUF_FLAG_ERROR) { + qbuf(buf); + return; + } data = (__u8 *)buf.m.userptr; s = buf.bytesused; break; @@ -522,11 +530,17 @@ void ApplicationWindow::capFrame() m_capStartAct->setChecked(false); return; } + + if (again) + return; + if (buf.flags & V4L2_BUF_FLAG_ERROR) { + qbuf(buf); + return; + } + #ifdef HAVE_ALSA alsa_thread_timestamp(&tv_alsa); #endif - if (again) - return; if (showFrames()) { if (m_mustConvert) @@ -551,11 +565,19 @@ void ApplicationWindow::capFrame() m_capStartAct->setChecked(false); return; } + if (again) + return; + if (buf.flags & V4L2_BUF_FLAG_ERROR) { + qbuf(buf); + return; + } #ifdef HAVE_ALSA alsa_thread_timestamp(&tv_alsa); #endif - if (again) + if (buf.flags & V4L2_BUF_FLAG_ERROR) { + qbuf(buf); return; + } if (showFrames()) { if (m_mustConvert)