summaryrefslogtreecommitdiff
path: root/drivers/media/platform/coda/coda-bit.c
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2019-04-12 11:51:34 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-05-29 06:21:17 -0400
commitb65f1e6546655569ac6c76b4d26c87470dc3f933 (patch)
treeb3a4ea494336fe0d29c248868efb2fbdcd35d07e /drivers/media/platform/coda/coda-bit.c
parent7edd18b64a16722a2059c2334657de01be810806 (diff)
media: coda: use v4l2_m2m_buf_copy_metadata
Use v4l2_m2m2_buf_copy_metadata to let BIT encoder contexts copy buffer field, timestamp, timestamp flags, and optionally timecode. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform/coda/coda-bit.c')
-rw-r--r--drivers/media/platform/coda/coda-bit.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c
index fd8c66a62099..c2e43a680e83 100644
--- a/drivers/media/platform/coda/coda-bit.c
+++ b/drivers/media/platform/coda/coda-bit.c
@@ -1506,12 +1506,7 @@ static void coda_finish_encode(struct coda_ctx *ctx)
dst_buf->flags &= ~V4L2_BUF_FLAG_KEYFRAME;
}
- dst_buf->vb2_buf.timestamp = src_buf->vb2_buf.timestamp;
- dst_buf->field = src_buf->field;
- dst_buf->flags &= ~V4L2_BUF_FLAG_TSTAMP_SRC_MASK;
- dst_buf->flags |=
- src_buf->flags & V4L2_BUF_FLAG_TSTAMP_SRC_MASK;
- dst_buf->timecode = src_buf->timecode;
+ v4l2_m2m_buf_copy_metadata(src_buf, dst_buf, false);
v4l2_m2m_buf_done(src_buf, VB2_BUF_STATE_DONE);