aboutsummaryrefslogtreecommitdiffstats
path: root/libavdevice/v4l2.c
diff options
context:
space:
mode:
authorGiorgio Vazzana <mywing81@gmail.com>2014-09-05 17:39:50 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-09-05 18:52:34 +0200
commit7865cafec295b545f6a2b813ca7539086917e513 (patch)
tree033c0ff0989cac60cb2d490b85b77d82fc2717e4 /libavdevice/v4l2.c
parent55cf7d9713dc839da47b56a19c97dc1b943d7d72 (diff)
downloadffmpeg-7865cafec295b545f6a2b813ca7539086917e513.tar.gz
lavd/v4l2: simplify list_framesizes()
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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index a1eed1a919..f0d0e2e60f 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -238,12 +238,12 @@ static int first_field(const struct video_data *s)
}
#if HAVE_STRUCT_V4L2_FRMIVALENUM_DISCRETE
-static void list_framesizes(AVFormatContext *ctx, int fd, uint32_t pixelformat)
+static void list_framesizes(AVFormatContext *ctx, uint32_t pixelformat)
{
const struct video_data *s = ctx->priv_data;
struct v4l2_frmsizeenum vfse = { .pixel_format = pixelformat };
- while(!v4l2_ioctl(fd, VIDIOC_ENUM_FRAMESIZES, &vfse)) {
+ while(!v4l2_ioctl(s->fd, VIDIOC_ENUM_FRAMESIZES, &vfse)) {
switch (vfse.type) {
case V4L2_FRMSIZE_TYPE_DISCRETE:
av_log(ctx, AV_LOG_INFO, " %ux%u",
@@ -296,7 +296,7 @@ static void list_formats(AVFormatContext *ctx, int fd, int type)
av_log(ctx, AV_LOG_INFO, " Emulated :");
#endif
#if HAVE_STRUCT_V4L2_FRMIVALENUM_DISCRETE
- list_framesizes(ctx, fd, vfd.pixelformat);
+ list_framesizes(ctx, vfd.pixelformat);
#endif
av_log(ctx, AV_LOG_INFO, "\n");
}