diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2019-06-18 12:45:26 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-06-24 14:42:06 -0400 |
commit | 9e3b94cc03db36c4735f0daa5a8789557550efc1 (patch) | |
tree | 15b83ddb94df28914b7032540a0a578c1d94c33d /drivers/media | |
parent | a02f6ca3367e1fd3cbd14e8798af90b8b667bbbe (diff) | |
download | linux-9e3b94cc03db36c4735f0daa5a8789557550efc1.tar.bz2 |
media: coda: mark the last output buffer on encoder stop command
Mark the last output buffer to be encoded.
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')
-rw-r--r-- | drivers/media/platform/coda/coda-common.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c index a1277d321aa3..d0de3b325b14 100644 --- a/drivers/media/platform/coda/coda-common.c +++ b/drivers/media/platform/coda/coda-common.c @@ -1037,12 +1037,17 @@ static int coda_encoder_cmd(struct file *file, void *fh, struct v4l2_encoder_cmd *ec) { struct coda_ctx *ctx = fh_to_ctx(fh); + struct vb2_v4l2_buffer *buf; int ret; ret = coda_try_encoder_cmd(file, fh, ec); if (ret < 0) return ret; + buf = v4l2_m2m_last_src_buf(ctx->fh.m2m_ctx); + if (buf) + buf->flags |= V4L2_BUF_FLAG_LAST; + /* Set the stream-end flag on this context */ ctx->bit_stream_param |= CODA_BIT_STREAM_END_FLAG; |