From 52722ca8c53243c2b3eb45731c01ec4d8d219f3b Mon Sep 17 00:00:00 2001 From: Philipp Zabel Date: Mon, 4 May 2015 07:51:08 -0300 Subject: [PATCH] [media] s5p-mfc: Set last buffer flag Setting the last buffer flag causes the videobuf2 core to return -EPIPE from DQBUF calls on the capture queue after the last buffer is dequeued. Signed-off-by: Philipp Zabel Signed-off-by: Kamil Debski Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/s5p-mfc/s5p_mfc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index 684a3363d1b8..8de61dc1e142 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -211,6 +211,7 @@ static void s5p_mfc_handle_frame_all_extracted(struct s5p_mfc_ctx *ctx) dst_buf->b->v4l2_buf.field = V4L2_FIELD_NONE; else dst_buf->b->v4l2_buf.field = V4L2_FIELD_INTERLACED; + dst_buf->b->v4l2_buf.flags |= V4L2_BUF_FLAG_LAST; ctx->dec_dst_flag &= ~(1 << dst_buf->b->v4l2_buf.index); vb2_buffer_done(dst_buf->b, VB2_BUF_STATE_DONE); -- 2.34.1