From: mglocker Date: Fri, 25 Jul 2008 17:20:27 +0000 (+0000) Subject: After our recent changes, VIDIOC_S_FMT didn't always return the correct X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=41e668278021a89aea9ff776f24e4abf9707972f;p=openbsd After our recent changes, VIDIOC_S_FMT didn't always return the correct maximum image size. Fix it. Makes read(2) method work again. --- 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 @@ -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); }