mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 13:37:36 +02:00
media: rkvdec: Do not override sizeimage for output format
commit298d8e8f7bupstream. The rkvdec H.264 decoder currently overrides sizeimage for the output format. This causes issues when userspace requires and requests a larger buffer, but ends up with one of insufficient size. Instead, only provide a default size if none was requested. This fixes the video_decode_accelerator_tests from Chromium failing on the first frame due to insufficient buffer space. It also aligns the behavior of the rkvdec driver with the Hantro and Cedrus drivers. Fixes:cd33c83044("media: rkvdec: Add the rkvdec driver") Cc: <stable@vger.kernel.org> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
949c5b6daa
commit
39275d2ec6
|
|
@ -1015,6 +1015,7 @@ static int rkvdec_h264_adjust_fmt(struct rkvdec_ctx *ctx,
|
||||||
struct v4l2_pix_format_mplane *fmt = &f->fmt.pix_mp;
|
struct v4l2_pix_format_mplane *fmt = &f->fmt.pix_mp;
|
||||||
|
|
||||||
fmt->num_planes = 1;
|
fmt->num_planes = 1;
|
||||||
|
if (!fmt->plane_fmt[0].sizeimage)
|
||||||
fmt->plane_fmt[0].sizeimage = fmt->width * fmt->height *
|
fmt->plane_fmt[0].sizeimage = fmt->width * fmt->height *
|
||||||
RKVDEC_H264_MAX_DEPTH_IN_BYTES;
|
RKVDEC_H264_MAX_DEPTH_IN_BYTES;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user