diff options
author | Ezequiel Garcia <ezequiel@collabora.com> | 2020-11-23 16:00:19 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-12-03 12:27:32 +0100 |
commit | 67f577b4d4f78168a4981235917f322e24c6d05e (patch) | |
tree | 42207df934c48f33df04ec22cf82434eacb04676 /drivers/media/v4l2-core | |
parent | 621214c36e84643bc104e030ef1e1422ff45156c (diff) | |
download | linux-67f577b4d4f78168a4981235917f322e24c6d05e.tar.bz2 |
media: controls: Add VP8 stateless type initialization
The VP8_FRAME_HEADER control type is validated, so it
needs a corresponding initialization to produce default
legal values.
For now, only add the minimum required initialization
to satisfy current validation.
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/v4l2-core')
-rw-r--r-- | drivers/media/v4l2-core/v4l2-ctrls.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index ad47d00e28d6..7febfbb256a6 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -1621,6 +1621,7 @@ static void std_init_compound(const struct v4l2_ctrl *ctrl, u32 idx, union v4l2_ctrl_ptr ptr) { struct v4l2_ctrl_mpeg2_slice_params *p_mpeg2_slice_params; + struct v4l2_ctrl_vp8_frame_header *p_vp8_frame_header; void *p = ptr.p + idx * ctrl->elem_size; if (ctrl->p_def.p_const) @@ -1643,6 +1644,10 @@ static void std_init_compound(const struct v4l2_ctrl *ctrl, u32 idx, p_mpeg2_slice_params->picture.picture_coding_type = V4L2_MPEG2_PICTURE_CODING_TYPE_I; break; + case V4L2_CTRL_TYPE_VP8_FRAME_HEADER: + p_vp8_frame_header = p; + p_vp8_frame_header->num_dct_parts = 1; + break; } } |