Commit b65f1e65 authored by Philipp Zabel's avatar Philipp Zabel Committed by Mauro Carvalho Chehab

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: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 7edd18b6
...@@ -1506,12 +1506,7 @@ static void coda_finish_encode(struct coda_ctx *ctx) ...@@ -1506,12 +1506,7 @@ static void coda_finish_encode(struct coda_ctx *ctx)
dst_buf->flags &= ~V4L2_BUF_FLAG_KEYFRAME; dst_buf->flags &= ~V4L2_BUF_FLAG_KEYFRAME;
} }
dst_buf->vb2_buf.timestamp = src_buf->vb2_buf.timestamp; v4l2_m2m_buf_copy_metadata(src_buf, dst_buf, false);
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_done(src_buf, VB2_BUF_STATE_DONE); v4l2_m2m_buf_done(src_buf, VB2_BUF_STATE_DONE);
......
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