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: Andriy Gelman <andriy.gelman@gmail.com>
This commit is contained in:
Andriy Gelman 2020-03-08 11:49:47 -04:00
parent 7464a26098
commit b343eca8d5

View File

@ -39,7 +39,7 @@ static int v4l2_try_start(AVCodecContext *avctx)
V4L2m2mContext *s = ((V4L2m2mPriv*)avctx->priv_data)->context;
V4L2Context *const capture = &s->capture;
V4L2Context *const output = &s->output;
struct v4l2_selection selection;
struct v4l2_selection selection = { 0 };
int ret;
/* 1. start the output process */