diff options
author | Giorgio Vazzana <mywing81@gmail.com> | 2014-09-05 17:43:59 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-09-05 20:25:58 +0200 |
commit | 0b890425e3547cd1818cbe24cadfbcf1b6c93e9a (patch) | |
tree | c5c83fb54f144e6c71784dd6a120aa344070a22d /libavdevice/v4l2.c | |
parent | 0a7239ae25e0741106b00def14ad8d8d4f211490 (diff) | |
download | ffmpeg-0b890425e3547cd1818cbe24cadfbcf1b6c93e9a.tar.gz |
lavd/v4l2: simplify list_formats()
We can avoid passing file descriptor fd explicitely.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice/v4l2.c')
-rw-r--r-- | libavdevice/v4l2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c index f0d0e2e60f..b473f7e6a3 100644 --- a/libavdevice/v4l2.c +++ b/libavdevice/v4l2.c @@ -264,12 +264,12 @@ static void list_framesizes(AVFormatContext *ctx, uint32_t pixelformat) } #endif -static void list_formats(AVFormatContext *ctx, int fd, int type) +static void list_formats(AVFormatContext *ctx, int type) { const struct video_data *s = ctx->priv_data; struct v4l2_fmtdesc vfd = { .type = V4L2_BUF_TYPE_VIDEO_CAPTURE }; - while(!v4l2_ioctl(fd, VIDIOC_ENUM_FMT, &vfd)) { + while(!v4l2_ioctl(s->fd, VIDIOC_ENUM_FMT, &vfd)) { enum AVCodecID codec_id = avpriv_fmt_v4l2codec(vfd.pixelformat); enum AVPixelFormat pix_fmt = avpriv_fmt_v4l2ff(vfd.pixelformat, codec_id); @@ -857,7 +857,7 @@ static int v4l2_read_header(AVFormatContext *ctx) s->channel, input.name, (uint64_t)input.std); if (s->list_format) { - list_formats(ctx, s->fd, s->list_format); + list_formats(ctx, s->list_format); res = AVERROR_EXIT; goto fail; } |