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: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
                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;
        }