提交 d2cc715a 编写于 作者: P Philipp Zabel 提交者: Mauro Carvalho Chehab

media: coda: jpeg: set buffer error flag when header parsing fails

If decoding fails because  the output buffer does not contain a
valid header, set the error flag on the returned capture buffer.
Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org>
上级 7e32aab9
......@@ -1355,7 +1355,7 @@ static int coda9_jpeg_prepare_decode(struct coda_ctx *ctx)
src_buf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx);
dst_buf = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx);
v4l2_m2m_buf_done(src_buf, VB2_BUF_STATE_DONE);
v4l2_m2m_buf_done(dst_buf, VB2_BUF_STATE_DONE);
v4l2_m2m_buf_done(dst_buf, VB2_BUF_STATE_ERROR);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册