summaryrefslogtreecommitdiffstats
path: root/libavdevice
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-07-20 10:55:59 +0200
committerNicolas George <nicolas.george@normalesup.org>2012-07-20 21:12:10 +0200
commitfd58678b86023ea98665f06756bf03f91e56be54 (patch)
tree5b442cc28a2f234494f0a80d25f6ce1798f1fb74 /libavdevice
parentb040ffc84c5e35436590e0bcea6608a2ad31cf84 (diff)
downloadffmpeg-streaming-fd58678b86023ea98665f06756bf03f91e56be54.zip
ffmpeg-streaming-fd58678b86023ea98665f06756bf03f91e56be54.tar.gz
v4l2: remove call to v4l2_fd_open.
v4l2_fd_open is already called at the end of v4l2_open; calling a second time leaks structures inside libv4l2. Fix trac ticket #1560.
Diffstat (limited to 'libavdevice')
-rw-r--r--libavdevice/v4l2.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 4829b1b..2808e13 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -156,9 +156,6 @@ static int device_open(AVFormatContext *ctx)
{
struct v4l2_capability cap;
int fd;
-#if CONFIG_LIBV4L2
- int fd_libv4l;
-#endif
int res, err;
int flags = O_RDWR;
@@ -175,16 +172,6 @@ static int device_open(AVFormatContext *ctx)
return AVERROR(err);
}
-#if CONFIG_LIBV4L2
- fd_libv4l = v4l2_fd_open(fd, 0);
- if (fd < 0) {
- err = AVERROR(errno);
- av_log(ctx, AV_LOG_ERROR, "Cannot open video device with libv4l neither %s : %s\n",
- ctx->filename, strerror(errno));
- return err;
- }
- fd = fd_libv4l;
-#endif
res = v4l2_ioctl(fd, VIDIOC_QUERYCAP, &cap);
if (res < 0) {
OpenPOWER on IntegriCloud