[PATCH v6, 10/15] media: mtk-vcodec: Fix v4l2-compliance fail
Steve Cho
stevecho at google.com
Thu Jan 27 22:00:09 UTC 2022
Reviewed-by: Steve Cho <stevecho at chromium.org>
Thanks,
Steve
On Fri, Jan 21, 2022 at 7:53 PM Yunfei Dong <yunfei.dong at mediatek.com>
wrote:
> Need to use default pic info when get pic info fail.
>
> Signed-off-by: Yunfei Dong <yunfei.dong at mediatek.com>
> ---
> drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
> b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
> index ba188d16f0fb..5a429ed83ed4 100644
> --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
> +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
> @@ -478,11 +478,14 @@ static int vidioc_vdec_s_fmt(struct file *file, void
> *priv,
> ctx->picinfo.pic_w = pix_mp->width;
> ctx->picinfo.pic_h = pix_mp->height;
>
> + /*
> + * If get pic info fail, need to use the default pic info
> params, or
> + * v4l2-compliance will fail
> + */
> ret = vdec_if_get_param(ctx, GET_PARAM_PIC_INFO,
> &ctx->picinfo);
> if (ret) {
> mtk_v4l2_err("[%d]Error!! Get
> GET_PARAM_PICTURE_INFO Fail",
> ctx->id);
> - return -EINVAL;
> }
>
> ctx->last_decoded_picinfo = ctx->picinfo;
> --
> 2.25.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20220127/db5339b1/attachment.htm>
More information about the dri-devel
mailing list