diff options
author | Alexandre Courbot <acourbot@chromium.org> | 2020-08-21 13:36:04 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-09-26 11:09:34 +0300 |
commit | 327296920f9dedfc6ba4ef8f5a686c9667c65f38 (patch) | |
tree | d02c8dbcb0ec9a0e81a357647e9182d2dd0d4c75 | |
parent | f01b10fa5abc66f24b5e5e2be7a4a3f7561387c1 (diff) | |
download | linux-327296920f9dedfc6ba4ef8f5a686c9667c65f38.tar.xz |
media: mtk-vcodec: venc: set OUTPUT buffers field to V4L2_FIELD_NONE
A default value of 0 means V4L2_FIELD_ANY, which is not correct.
Reported by v4l2-compliance.
Signed-off-by: Alexandre Courbot <acourbot@chromium.org>
Acked-by: Tiffany Lin <tiffany.lin@mediatek.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r-- | drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c index bc3095b7177f..50da2748c785 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c @@ -893,8 +893,17 @@ static void vb2ops_venc_stop_streaming(struct vb2_queue *q) ctx->state = MTK_STATE_FREE; } +static int vb2ops_venc_buf_out_validate(struct vb2_buffer *vb) +{ + struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); + + vbuf->field = V4L2_FIELD_NONE; + return 0; +} + static const struct vb2_ops mtk_venc_vb2_ops = { .queue_setup = vb2ops_venc_queue_setup, + .buf_out_validate = vb2ops_venc_buf_out_validate, .buf_prepare = vb2ops_venc_buf_prepare, .buf_queue = vb2ops_venc_buf_queue, .wait_prepare = vb2_ops_wait_prepare, |