Skip to content

Commit 5e57a86

Browse files
Kwiboomchehab
authored andcommitted
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>
1 parent f942d10 commit 5e57a86

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/staging/media/rkvdec/rkvdec.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,8 @@ static int rkvdec_try_capture_fmt(struct file *file, void *priv,
257257
pix_mp->pixelformat = coded_desc->decoded_fmts[0];
258258

259259
/* Always apply the frmsize constraint of the coded end. */
260+
pix_mp->width = max(pix_mp->width, ctx->coded_fmt.fmt.pix_mp.width);
261+
pix_mp->height = max(pix_mp->height, ctx->coded_fmt.fmt.pix_mp.height);
260262
v4l2_apply_frmsize_constraints(&pix_mp->width,
261263
&pix_mp->height,
262264
&coded_desc->frmsize);

0 commit comments

Comments
 (0)