summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMarcus Glocker <mglocker@cvs.openbsd.org>2008-07-25 17:20:28 +0000
committerMarcus Glocker <mglocker@cvs.openbsd.org>2008-07-25 17:20:28 +0000
commit09eb70cf4b8e76889a7077b9334197fa6a321d93 (patch)
treeb3ddae17024f559d4280cacb3524d7af6f06890f /sys
parent72e71c082e58b323c861fea05e1a50e3a3eaa870 (diff)
After our recent changes, VIDIOC_S_FMT didn't always return the correct
maximum image size. Fix it. Makes read(2) method work again.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/uvideo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c
index b912819b1a3..85eb843406b 100644
--- a/sys/dev/usb/uvideo.c
+++ b/sys/dev/usb/uvideo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvideo.c,v 1.62 2008/07/25 11:12:34 mglocker Exp $ */
+/* $OpenBSD: uvideo.c,v 1.63 2008/07/25 17:20:27 mglocker Exp $ */
/*
* Copyright (c) 2008 Robert Nagy <robert@openbsd.org>
@@ -2200,7 +2200,7 @@ uvideo_s_fmt(void *v, struct v4l2_format *fmt)
DEVNAME(sc), __func__, r.width, r.height);
/* tell our sample buffer size */
- fmt->fmt.pix.sizeimage = sc->sc_sample_buffer.buf_size;
+ fmt->fmt.pix.sizeimage = UGETDW(sc->sc_desc_probe.dwMaxVideoFrameSize);
return (0);
}