Skip to content

Commit

Permalink
V4L/DVB (6278): Buf: fix typo that caused data loss when readng strea…
Browse files Browse the repository at this point in the history
…ms from device

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>
  • Loading branch information
Maxim Levitsky authored and Mauro Carvalho Chehab committed Oct 10, 2007
1 parent 14f37ae commit d00cd29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/videobuf-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d00cd29

Please sign in to comment.