V4L/DVB: tm6000: bugfix image position
authorStefan Ringel <stefan.ringel@arcor.de>
Fri, 7 May 2010 15:29:04 +0000 (12:29 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 19 May 2010 15:59:17 +0000 (12:59 -0300)
bugfix incorrect image and line position in videobuffer

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/staging/tm6000/tm6000-video.c

index 721d5a5..7828030 100644 (file)
@@ -225,8 +225,8 @@ static int copy_packet(struct urb *urb, u32 header, u8 **ptr, u8 *endp,
                         * It should, instead, check if the user selected
                         * entrelaced or non-entrelaced mode
                         */
-                       pos= ((line<<1)+field)*linewidth +
-                               block*TM6000_URB_MSG_LEN;
+                       pos = ((line << 1) - field - 1) * linewidth +
+                               block * TM6000_URB_MSG_LEN;
 
                        /* Don't allow to write out of the buffer */
                        if (pos+TM6000_URB_MSG_LEN > (*buf)->vb.size) {