Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a8ab68bffe3fe7b8e9ff963ea321d283fc77ac5f
Commit:     a8ab68bffe3fe7b8e9ff963ea321d283fc77ac5f
Parent:     35378434e739ac869d0146a47133a0f9d6fd2ee8
Author:     Trent Piepho <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 22 17:44:55 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Sun Nov 4 21:41:16 2007 -0200

    V4L/DVB (6392): bttv: Update initial image size when set via V4L1 
VIDIOCMCAPTURE
    
    The V4L1 spec says that the image size should be with with VIDIOCSWIN before
    requesting buffers with VIDIOCGMBUF and capturing into them with
    VIDIOCMCAPTURE.
    
    But it seems that many apps don't do this.  They set the size using the 
fields
    in the VIDIOCMCAPTURE ioctl.  The driver doesn't know what size to capture
    until it actually starts to capture.  In particular, it doesn't know what 
size
    to capture until it has already mmap the captured buffers.  Which is quite
    stupid.  Why V4L1 has size and format fields for VIDIOCMCAPTURE I have no 
idea.
    
    Many drivers don't support this, including those using v4l1-compat.
    
    The bttv does, which is probably the only reason such broken software is so
    prevalent.
    
    But, the driver doesn't adjust its idea of what size is being captured when 
it
    is set this way.  If you try to query the driver's current setting with
    v4l2-ctl, it won't be correct.
    
    Signed-off-by: Trent Piepho <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/bt8xx/bttv-driver.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/bt8xx/bttv-driver.c 
b/drivers/media/video/bt8xx/bttv-driver.c
index 56e4350..a88b56e 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -3113,6 +3113,8 @@ static int bttv_do_ioctl(struct inode *inode, struct file 
*file,
                                             vm->width,vm->height,field);
                if (0 != retval)
                        goto fh_unlock_and_return;
+               btv->init.width = vm->width;
+               btv->init.height = vm->height;
                spin_lock_irqsave(&btv->s_lock,flags);
                buffer_queue(&fh->cap,&buf->vb);
                spin_unlock_irqrestore(&btv->s_lock,flags);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to