diff options
author | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2011-03-31 22:13:13 +0000 |
---|---|---|
committer | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2011-03-31 22:13:13 +0000 |
commit | fd5c4860391ad390467c49d6d1caada894d30f74 (patch) | |
tree | 0193362ffa718086d4bd4925e66f358858032d6d /sys/dev | |
parent | d8bd145537927eb573c382abc662f76f0af33597 (diff) |
just report the frame interval in the same terms the device gives us.
previously, this was returning the wrong value (frame rate instead
of time per frame, d'oh!).
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/uvideo.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c index 216cdcc5352..d29e5e3480d 100644 --- a/sys/dev/usb/uvideo.c +++ b/sys/dev/usb/uvideo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvideo.c,v 1.158 2011/03/26 19:50:52 jakemsr Exp $ */ +/* $OpenBSD: uvideo.c,v 1.159 2011/03/31 22:13:12 jakemsr Exp $ */ /* * Copyright (c) 2008 Robert Nagy <robert@openbsd.org> @@ -3000,15 +3000,13 @@ int uvideo_g_parm(void *v, struct v4l2_streamparm *parm) { struct uvideo_softc *sc = v; - int ns; - ns = UGETDW(sc->sc_desc_probe.dwFrameInterval); if (parm->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) { parm->parm.capture.capability = V4L2_CAP_TIMEPERFRAME; parm->parm.capture.capturemode = 0; parm->parm.capture.timeperframe.numerator = - (ns == 0) ? 0 : 10000000 / ns; - parm->parm.capture.timeperframe.denominator = 1; + UGETDW(sc->sc_desc_probe.dwFrameInterval); + parm->parm.capture.timeperframe.denominator = 10000000; } else return (EINVAL); |