diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2013-03-27 14:11:31 +0400 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2013-04-01 12:38:14 +0400 |
commit | 9dd54d74226eaaa1087ba994ba212bf9a107c97d (patch) | |
tree | d74e36e7ee2f9fe2f9db67dcc877d38bb9f55dcb /libavdevice/v4l2.c | |
parent | f810ca63f804cd9f9da5e7a788ecc5b638b706c0 (diff) |
lavd/v4l2: fully init an ioctl argument.
Silence a valgrind warning about uninitialized memory.
Diffstat (limited to 'libavdevice/v4l2.c')
-rw-r--r-- | libavdevice/v4l2.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c index 284b495cd9..34e3d9cf42 100644 --- a/libavdevice/v4l2.c +++ b/libavdevice/v4l2.c @@ -949,11 +949,10 @@ static int v4l2_read_header(AVFormatContext *s1) } if (!s->width && !s->height) { - struct v4l2_format fmt; + struct v4l2_format fmt = { .type = V4L2_BUF_TYPE_VIDEO_CAPTURE }; av_log(s1, AV_LOG_VERBOSE, "Querying the device for the current frame size\n"); - fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if (v4l2_ioctl(s->fd, VIDIOC_G_FMT, &fmt) < 0) { res = AVERROR(errno); av_log(s1, AV_LOG_ERROR, "ioctl(VIDIOC_G_FMT): %s\n", av_err2str(res)); |