diff options
author | Jonas Karlman <jonas@kwiboo.se> | 2022-05-13 22:29:16 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-05-17 10:07:08 +0200 |
commit | 5e57a860df6cb5ee2b2502a0d4aceb23c35471c9 (patch) | |
tree | 19eb5477c064bb09dcd183658aebbd2431f6a076 /drivers/staging/media/rkvdec | |
parent | f942d10dab5afba301fc215954f62e1761a7225a (diff) | |
download | linux-stable-5e57a860df6cb5ee2b2502a0d4aceb23c35471c9.tar.gz linux-stable-5e57a860df6cb5ee2b2502a0d4aceb23c35471c9.tar.bz2 linux-stable-5e57a860df6cb5ee2b2502a0d4aceb23c35471c9.zip |
media: rkvdec: Ensure decoded resolution fit coded resolution
Ensure decoded CAPTURE buffer resolution is larger or equal to the coded
OUTPUT buffer resolution.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/staging/media/rkvdec')
-rw-r--r-- | drivers/staging/media/rkvdec/rkvdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c index e3d44d5b35f3..2bc4b1a40989 100644 --- a/drivers/staging/media/rkvdec/rkvdec.c +++ b/drivers/staging/media/rkvdec/rkvdec.c @@ -257,6 +257,8 @@ static int rkvdec_try_capture_fmt(struct file *file, void *priv, pix_mp->pixelformat = coded_desc->decoded_fmts[0]; /* Always apply the frmsize constraint of the coded end. */ + pix_mp->width = max(pix_mp->width, ctx->coded_fmt.fmt.pix_mp.width); + pix_mp->height = max(pix_mp->height, ctx->coded_fmt.fmt.pix_mp.height); v4l2_apply_frmsize_constraints(&pix_mp->width, &pix_mp->height, &coded_desc->frmsize); |