<div dir="ltr"><div>Reviewed-by: Steve Cho <<a href="mailto:stevecho@chromium.org">stevecho@chromium.org</a>><br></div><div><br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Thanks,<div>Steve</div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 21, 2022 at 7:53 PM Yunfei Dong <<a href="mailto:yunfei.dong@mediatek.com">yunfei.dong@mediatek.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Need to use default pic info when get pic info fail.<br>
<br>
Signed-off-by: Yunfei Dong <<a href="mailto:yunfei.dong@mediatek.com" target="_blank">yunfei.dong@mediatek.com</a>><br>
---<br>
 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 5 ++++-<br>
 1 file changed, 4 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c<br>
index ba188d16f0fb..5a429ed83ed4 100644<br>
--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c<br>
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c<br>
@@ -478,11 +478,14 @@ static int vidioc_vdec_s_fmt(struct file *file, void *priv,<br>
                ctx->picinfo.pic_w = pix_mp->width;<br>
                ctx->picinfo.pic_h = pix_mp->height;<br>
<br>
+               /*<br>
+                * If get pic info fail, need to use the default pic info params, or<br>
+                * v4l2-compliance will fail<br>
+                */<br>
                ret = vdec_if_get_param(ctx, GET_PARAM_PIC_INFO, &ctx->picinfo);<br>
                if (ret) {<br>
                        mtk_v4l2_err("[%d]Error!! Get GET_PARAM_PICTURE_INFO Fail",<br>
                                     ctx->id);<br>
-                       return -EINVAL;<br>
                }<br>
<br>
                ctx->last_decoded_picinfo = ctx->picinfo;<br>
-- <br>
2.25.1<br>
<br>
</blockquote></div>