LinuxTV Patchwork [12/13] media: coda: use v4l2_m2m_buf_copy_metadata

login
register
mail settings
Submitter Philipp Zabel
Date April 12, 2019, 3:51 p.m.
Message ID <20190412155135.13907-12-p.zabel@pengutronix.de>
Download mbox | patch
Permalink /patch/55654/
State New
Headers show

Comments

Philipp Zabel - April 12, 2019, 3:51 p.m.
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>
---
 drivers/media/platform/coda/coda-bit.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Patch

diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c
index 2b73e023b191..d10b113610eb 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);
 

Privacy Policy