summaryrefslogtreecommitdiff
path: root/libavdevice/v4l2.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-05-28 20:38:06 +0200
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2011-05-28 21:16:47 +0200
commitf8f3f6c40bb452bb716096f455391f3fba324190 (patch)
tree53d82e2c02c61071f2c07717c03becef49fb6fd3 /libavdevice/v4l2.c
parentb2a6f25c67cca644257f008c8de83e4939f87196 (diff)
v4l2: use OFFSET macro when setting options
Improve readability.
Diffstat (limited to 'libavdevice/v4l2.c')
-rw-r--r--libavdevice/v4l2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 830fe0c6e9..d06ec29a87 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -715,9 +715,10 @@ static int v4l2_read_close(AVFormatContext *s1)
#define OFFSET(x) offsetof(struct video_data, x)
#define DEC AV_OPT_FLAG_DECODING_PARAM
+
static const AVOption options[] = {
- { "standard", "", offsetof(struct video_data, standard), FF_OPT_TYPE_STRING, {.str = "NTSC" }, 0, 0, AV_OPT_FLAG_DECODING_PARAM },
- { "channel", "", offsetof(struct video_data, channel), FF_OPT_TYPE_INT, {.dbl = 0 }, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
+ { "standard", "", OFFSET(standard), FF_OPT_TYPE_STRING, {.str = "NTSC" }, 0, 0, AV_OPT_FLAG_DECODING_PARAM },
+ { "channel", "", OFFSET(channel), FF_OPT_TYPE_INT, {.dbl = 0 }, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
{ "video_size", "A string describing frame size, such as 640x480 or hd720.", OFFSET(video_size), FF_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC },
{ NULL },
};