]> err.no Git - linux-2.6/commitdiff
V4L/DVB (6714): ivtv: yuv frame parameter fix
authorIan Armstrong <ian@iarmst.demon.co.uk>
Sun, 21 Oct 2007 11:09:10 +0000 (08:09 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Fri, 25 Jan 2008 21:03:10 +0000 (19:03 -0200)
Inadvertently missed a line when converting code to new hardware buffering
method. In some circumstances, this would lead to a frame being displayed
using parameters belonging to another frame.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/ivtv/ivtv-irq.c

index fc8eac09584cdf2244cbd7d066a84cdebb182b2f..8c00d8f6d4d945be94a5527d59c97791fdf6df27 100644 (file)
@@ -797,7 +797,7 @@ static void ivtv_irq_vsync(struct ivtv *itv)
                /* Check if we need to update the yuv registers */
                if ((yi->yuv_forced_update || yi->new_frame_info[last_dma_frame].update) && last_dma_frame != -1) {
                        if (!yi->new_frame_info[last_dma_frame].update)
-                               last_dma_frame = (last_dma_frame - 1) & 3;
+                               last_dma_frame = (u8)(last_dma_frame - 1) % IVTV_YUV_BUFFERS;
 
                        if (yi->new_frame_info[last_dma_frame].src_w) {
                                yi->update_frame = last_dma_frame;