Commit d006a979 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] vim2m: small cleanup: use assignment instead of memcpy

Use a type-safe assignment instead of memcpy. And it is easier to read as well.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 00507a8d
......@@ -233,12 +233,9 @@ static int device_process(struct vim2m_ctx *ctx,
out_vb->v4l2_buf.sequence = get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_CAPTURE)->sequence++;
in_vb->v4l2_buf.sequence = q_data->sequence++;
memcpy(&out_vb->v4l2_buf.timestamp,
&in_vb->v4l2_buf.timestamp,
sizeof(struct timeval));
out_vb->v4l2_buf.timestamp = in_vb->v4l2_buf.timestamp;
if (in_vb->v4l2_buf.flags & V4L2_BUF_FLAG_TIMECODE)
memcpy(&out_vb->v4l2_buf.timecode, &in_vb->v4l2_buf.timecode,
sizeof(struct v4l2_timecode));
out_vb->v4l2_buf.timecode = in_vb->v4l2_buf.timecode;
out_vb->v4l2_buf.field = in_vb->v4l2_buf.field;
out_vb->v4l2_buf.flags = in_vb->v4l2_buf.flags &
(V4L2_BUF_FLAG_TIMECODE |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment