summaryrefslogtreecommitdiff
path: root/channels/vgrabbers.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/vgrabbers.c')
-rw-r--r--channels/vgrabbers.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/channels/vgrabbers.c b/channels/vgrabbers.c
index 25817407e..169e59c5d 100644
--- a/channels/vgrabbers.c
+++ b/channels/vgrabbers.c
@@ -226,12 +226,8 @@ static void *grab_v4l1_open(const char *dev, struct fbuf_t *geom, int fps)
v->b = *geom;
b = &v->b; /* shorthand */
- i = fcntl(fd, F_GETFL);
- if (-1 == fcntl(fd, F_SETFL, i | O_NONBLOCK)) {
- /* non fatal, just emit a warning */
- ast_log(LOG_WARNING, "error F_SETFL for %s [%s]\n",
- dev, strerror(errno));
- }
+ ast_fd_set_flags(fd, O_NONBLOCK);
+
/* set format for the camera.
* In principle we could retry with a different format if the
* one we are asking for is not supported.