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 <[email protected]> Signed-off-by: Nicolas Dufresne <[email protected]> Reviewed-by: Sebastian Fricke <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent f942d10 commit 5e57a86

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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)