V4L/DVB (6046): ivtv: always steal full frames if out of buffers.
authorHans Verkuil <hverkuil@xs4all.nl>
Sat, 28 Jul 2007 15:07:12 +0000 (12:07 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 10 Oct 2007 01:05:32 +0000 (22:05 -0300)
commitf4071b85ea0ca3bd06f63c330562b4cfdffa8473
tree8390a1bb512949e9520f65de160e1e7291a4c36f
parent3562c43be8cfd6e300508d7c33acebf3369eacd3
V4L/DVB (6046): ivtv: always steal full frames if out of buffers.

When there are no more free buffers, then buffers are stolen from the
predma queue. Buffers should be stolen from the head of that queue (which
is where the most recently added buffers are) and all buffers belonging
to a frame should be stolen. Otherwise 'half-frames' would remain in the
queue, which leads to ugly playback and complete sync failure for YUV
buffers.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/ivtv/ivtv-driver.h
drivers/media/video/ivtv/ivtv-fileops.c
drivers/media/video/ivtv/ivtv-irq.c
drivers/media/video/ivtv/ivtv-queue.c