aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndriy Gelman <andriy.gelman@gmail.com>2020-03-08 11:49:47 -0400
committerAndriy Gelman <andriy.gelman@gmail.com>2020-03-31 23:41:37 -0400
commitb343eca8d5b9546f6d630736938825707f58e6c6 (patch)
tree196bd363c7c07a3002e62605d11d7376395af715
parent7464a260983182a1603a8a5923fac0a0f0e17b5f (diff)
downloadffmpeg-b343eca8d5b9546f6d630736938825707f58e6c6.tar.gz
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>
-rw-r--r--libavcodec/v4l2_m2m_dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/v4l2_m2m_dec.c b/libavcodec/v4l2_m2m_dec.c
index d666edffe4..c5ee86b993 100644
--- a/libavcodec/v4l2_m2m_dec.c
+++ b/libavcodec/v4l2_m2m_dec.c
@@ -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 */