mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 22:54:05 +08:00
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>
This commit is contained in:
parent
abd12e85fc
commit
d856b360aa
@ -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_w = pix_mp->width;
|
||||||
ctx->picinfo.pic_h = pix_mp->height;
|
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);
|
ret = vdec_if_get_param(ctx, GET_PARAM_PIC_INFO, &ctx->picinfo);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
mtk_v4l2_err("[%d]Error!! Get GET_PARAM_PICTURE_INFO Fail",
|
mtk_v4l2_err("[%d]Error!! Get GET_PARAM_PICTURE_INFO Fail",
|
||||||
ctx->id);
|
ctx->id);
|
||||||
return -EINVAL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx->last_decoded_picinfo = ctx->picinfo;
|
ctx->last_decoded_picinfo = ctx->picinfo;
|
||||||
|
Loading…
Reference in New Issue
Block a user