diff options
author | Marcus Glocker <mglocker@cvs.openbsd.org> | 2021-02-16 13:57:42 +0000 |
---|---|---|
committer | Marcus Glocker <mglocker@cvs.openbsd.org> | 2021-02-16 13:57:42 +0000 |
commit | fe6495d751c17acc25da2b2ce1e03cfe535d76ef (patch) | |
tree | 2fb17747cb7345ec513ae757f6f944887259d19f /app/video | |
parent | 619ea649bf1528db6a6686f78fbeb86f16748871 (diff) |
Also call the VIDIOC_STREAMOFF ioctl when we stop a read(2) stream. This
is required by the new video(4) multiopen functionality.
Diffstat (limited to 'app/video')
-rw-r--r-- | app/video/video.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/video/video.c b/app/video/video.c index e6daf0591..2cd9672a2 100644 --- a/app/video/video.c +++ b/app/video/video.c @@ -1,4 +1,4 @@ -/* $OpenBSD: video.c,v 1.39 2020/09/07 10:35:22 mglocker Exp $ */ +/* $OpenBSD: video.c,v 1.40 2021/02/16 13:57:41 mglocker Exp $ */ /* * Copyright (c) 2010 Jacob Meuser <jakemsr@openbsd.org> * @@ -2056,6 +2056,8 @@ cleanup(struct video *vid, int excode) if (vid->dev.fd >= 0) { if (vid->mmap_on) mmap_stop(vid); + else + (void)ioctl(vid->dev.fd, VIDIOC_STREAMOFF, &type); close(vid->dev.fd); } |