]> err.no Git - linux-2.6/commitdiff
V4L/DVB (6278): Buf: fix typo that caused data loss when readng streams from device
authorMaxim Levitsky <maximlevitsky@gmail.com>
Tue, 2 Oct 2007 12:03:39 +0000 (09:03 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 10 Oct 2007 03:03:08 +0000 (00:03 -0300)
If videobuf_read_stream reads two or more buffers it was overwriting the first one

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
http://thread.gmane.org/gmane.comp.video.video4linux/34978/focus=34981
Reviewed-by: Ricardo Cerqueira <v4l@cerqueira.org>
drivers/media/video/videobuf-core.c

index ca67f80184bdfb69fd9e44a6e420036793dd58c4..8e4026e6fae3c62b2d16ae24ad5b7bbc8c772a3c 100644 (file)
@@ -771,7 +771,7 @@ ssize_t videobuf_read_stream(struct videobuf_queue *q,
                }
 
                if (q->read_buf->state == STATE_DONE) {
-                       rc = CALL (q,copy_stream, q, data, count,
+                       rc = CALL (q,copy_stream, q, data + retval, count,
                                        retval, vbihack, nonblocking);
                        if (rc < 0) {
                                retval = rc;