From 002182754dd7076b66b7f3188c0b95b47fbec3df Mon Sep 17 00:00:00 2001
From: Tristan Matthews <tristan.matthews@savoirfairelinux.com>
Date: Thu, 19 Jul 2012 21:54:18 -0400
Subject: [PATCH 1/1] v4l2: check correct file descriptor in error handling
---
libavdevice/v4l2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 4829b1b..96762a6 100644
|
a
|
b
|
static int device_open(AVFormatContext *ctx)
|
| 177 | 177 | } |
| 178 | 178 | #if CONFIG_LIBV4L2 |
| 179 | 179 | fd_libv4l = v4l2_fd_open(fd, 0); |
| 180 | | if (fd < 0) { |
| | 180 | if (fd_libv4l < 0) { |
| 181 | 181 | err = AVERROR(errno); |
| 182 | 182 | av_log(ctx, AV_LOG_ERROR, "Cannot open video device with libv4l neither %s : %s\n", |
| 183 | 183 | ctx->filename, strerror(errno)); |