From e8a2a41ee290c35e118f7a372454401e5a0f8b51 Mon Sep 17 00:00:00 2001 From: Wu-Cheng Li Date: Wed, 8 Mar 2017 00:40:58 -0300 Subject: [media] mtk-vcodec: check the vp9 decoder buffer index from VPU VPU firmware has a bug and may return invalid buffer index for some vp9 videos. Check the buffer indexes before accessing the buffer. Signed-off-by: Wu-Cheng Li Acked-by: Tiffany Lin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/mtk-vcodec/vdec_drv_if.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/media/platform/mtk-vcodec/vdec_drv_if.h') diff --git a/drivers/media/platform/mtk-vcodec/vdec_drv_if.h b/drivers/media/platform/mtk-vcodec/vdec_drv_if.h index db6b5205ffb1..ded1154481cd 100644 --- a/drivers/media/platform/mtk-vcodec/vdec_drv_if.h +++ b/drivers/media/platform/mtk-vcodec/vdec_drv_if.h @@ -85,6 +85,8 @@ void vdec_if_deinit(struct mtk_vcodec_ctx *ctx); * @res_chg : [out] resolution change happens if current bs have different * picture width/height * Note: To flush the decoder when reaching EOF, set input bitstream as NULL. + * + * Return: 0 on success. -EIO on unrecoverable error. */ int vdec_if_decode(struct mtk_vcodec_ctx *ctx, struct mtk_vcodec_mem *bs, struct vdec_fb *fb, bool *res_chg); -- cgit