media: vicodec: use v4l2_m2m_buf_copy_data
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 24 Oct 2018 10:51:30 +0000 (06:51 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 7 Jan 2019 18:16:59 +0000 (13:16 -0500)
Use the new v4l2_m2m_buf_copy_data() function in vicodec.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/vicodec/vicodec-core.c

index 0d7876f..2378582 100644 (file)
@@ -190,18 +190,8 @@ static int device_process(struct vicodec_ctx *ctx,
        }
 
        dst_vb->sequence = q_dst->sequence++;
-       dst_vb->vb2_buf.timestamp = src_vb->vb2_buf.timestamp;
-
-       if (src_vb->flags & V4L2_BUF_FLAG_TIMECODE)
-               dst_vb->timecode = src_vb->timecode;
-       dst_vb->field = src_vb->field;
        dst_vb->flags &= ~V4L2_BUF_FLAG_LAST;
-       dst_vb->flags |= src_vb->flags &
-               (V4L2_BUF_FLAG_TIMECODE |
-                V4L2_BUF_FLAG_KEYFRAME |
-                V4L2_BUF_FLAG_PFRAME |
-                V4L2_BUF_FLAG_BFRAME |
-                V4L2_BUF_FLAG_TSTAMP_SRC_MASK);
+       v4l2_m2m_buf_copy_data(src_vb, dst_vb, !ctx->is_enc);
 
        return 0;
 }