LinuxTV Patchwork [PATCHv2,6/6] v4l2-ctrls: mark MPEG2 stateless controls as REQUIRES_REQUESTS

login
register
mail settings
Submitter Hans Verkuil
Date Feb. 11, 2019, 10:13 a.m.
Message ID <20190211101357.48754-7-hverkuil-cisco@xs4all.nl>
Download mbox | patch
Permalink /patch/54442/
State Superseded
Delegated to: Hans Verkuil
Headers show

Comments

Hans Verkuil - Feb. 11, 2019, 10:13 a.m.
These stateless codec controls can only be used in combination with
a request. So mark them as such.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
 drivers/media/v4l2-core/v4l2-ctrls.c | 2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
index 25f80f0eba69..7825c8d66498 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls.c
@@ -1299,9 +1299,11 @@  void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
 		break;
 	case V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS:
 		*type = V4L2_CTRL_TYPE_MPEG2_SLICE_PARAMS;
+		*flags |= V4L2_CTRL_FLAG_REQUIRES_REQUESTS;
 		break;
 	case V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION:
 		*type = V4L2_CTRL_TYPE_MPEG2_QUANTIZATION;
+		*flags |= V4L2_CTRL_FLAG_REQUIRES_REQUESTS;
 		break;
 	default:
 		*type = V4L2_CTRL_TYPE_INTEGER;

Privacy Policy