diff options
author | Yunfei Dong <yunfei.dong@mediatek.com> | 2022-05-12 05:19:44 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-05-13 15:46:39 +0300 |
commit | d856b360aa82f0aa60bc469413743bf88768ac61 (patch) | |
tree | fc0e738341f1def30070f15bf22f135d849d0eac | |
parent | abd12e85fc95c8ec7277bfe42da222937620a949 (diff) | |
download | linux-d856b360aa82f0aa60bc469413743bf88768ac61.tar.xz |
media: mediatek: vcodec: Fix v4l2-compliance fail
Need to use default pic info when get pic info fail.
Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
Reviewed-by: Steve Cho <stevecho@chromium.org>
Tested-by: NĂcolas F. R. A. Prado <nfraprado@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
-rw-r--r-- | drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c index fae0dfc606b1..ff79687089e2 100644 --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c @@ -474,11 +474,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; |