media: coda: set field of destination buffers
authorPhilipp Zabel <p.zabel@pengutronix.de>
Fri, 7 Jul 2017 09:58:28 +0000 (05:58 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 19 Jul 2017 19:19:57 +0000 (15:19 -0400)
Set the field of destination buffers properly.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/coda/coda-bit.c

index 50eed63..a4abeab 100644 (file)
@@ -1412,6 +1412,7 @@ static void coda_finish_encode(struct coda_ctx *ctx)
        }
 
        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;
@@ -2154,6 +2155,7 @@ static void coda_finish_decode(struct coda_ctx *ctx)
                dst_buf = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx);
                dst_buf->sequence = ctx->osequence++;
 
+               dst_buf->field = V4L2_FIELD_NONE;
                dst_buf->flags &= ~(V4L2_BUF_FLAG_KEYFRAME |
                                             V4L2_BUF_FLAG_PFRAME |
                                             V4L2_BUF_FLAG_BFRAME);