mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
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>
This commit is contained in:
parent
f942d10dab
commit
5e57a860df
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue