Commit b343eca8 authored by Andriy Gelman's avatar Andriy Gelman

avcodec/v4l2_m2m_dec: Init reserved bytes to zero before ioctl call

struct v4l2_selection contains reserved bytes which should be set to
zero before the ioctl call.

Fixes valgrind error:
Syscall param ioctl(VKI_V4L2_S_SELECTION) points to uninitialised byte(s)
Signed-off-by: 's avatarAndriy Gelman <andriy.gelman@gmail.com>
parent 7464a260
...@@ -39,7 +39,7 @@ static int v4l2_try_start(AVCodecContext *avctx) ...@@ -39,7 +39,7 @@ static int v4l2_try_start(AVCodecContext *avctx)
V4L2m2mContext *s = ((V4L2m2mPriv*)avctx->priv_data)->context; V4L2m2mContext *s = ((V4L2m2mPriv*)avctx->priv_data)->context;
V4L2Context *const capture = &s->capture; V4L2Context *const capture = &s->capture;
V4L2Context *const output = &s->output; V4L2Context *const output = &s->output;
struct v4l2_selection selection; struct v4l2_selection selection = { 0 };
int ret; int ret;
/* 1. start the output process */ /* 1. start the output process */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment