This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/v4l-utils.git tree:

Subject: qv4l2: make sure to reset bytesperline.
Author:  Hans Verkuil <[email protected]>
Date:    Fri Nov 18 14:48:07 2011 +0100

If bytesperline > width * bpp, then qv4l2 can't handle that situation correctly,
partially due to missing support for this in qv4l2, partially due to missing
support for this in libv4lconvert.

So before starting capturing, call s_fmt with bytesperline 0 and use whatever
the driver returns.

Signed-off-by: Hans Verkuil <[email protected]>
(cherry picked from commit 70b8838b95d47c1e80a60e659ef87820e117b5ae)

Signed-off-by: Gregor Jasny <[email protected]>

 utils/qv4l2/qv4l2.cpp    |    1 +
 utils/qv4l2/v4l2-api.cpp |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)

---

http://git.linuxtv.org/v4l-utils.git?a=commitdiff;h=589117834326cff12bf31095664bf95c02569262

diff --git a/utils/qv4l2/qv4l2.cpp b/utils/qv4l2/qv4l2.cpp
index be28e4f..c24cd7d 100644
--- a/utils/qv4l2/qv4l2.cpp
+++ b/utils/qv4l2/qv4l2.cpp
@@ -465,6 +465,7 @@ void ApplicationWindow::capStart(bool start)
        m_frame = m_lastFrame = m_fps = 0;
        m_capMethod = m_genTab->capMethod();
        g_fmt_cap(m_capSrcFormat);
+       s_fmt(m_capSrcFormat);
 
        m_mustConvert = m_showFrames;
        if (m_showFrames) {
diff --git a/utils/qv4l2/v4l2-api.cpp b/utils/qv4l2/v4l2-api.cpp
index c2ec98f..074070a 100644
--- a/utils/qv4l2/v4l2-api.cpp
+++ b/utils/qv4l2/v4l2-api.cpp
@@ -274,11 +274,13 @@ bool v4l2::g_fmt_out(v4l2_format &fmt)
 bool v4l2::try_fmt(v4l2_format &fmt)
 {
        fmt.fmt.pix.field = V4L2_FIELD_ANY;
+       fmt.fmt.pix.bytesperline = 0;
        return ioctl("Try Capture Format", VIDIOC_TRY_FMT, &fmt);
 }
 
 bool v4l2::s_fmt(v4l2_format &fmt)
 {
+       fmt.fmt.pix.bytesperline = 0;
        return ioctl("Set Capture Format", VIDIOC_S_FMT, &fmt);
 }
 

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to