The crop and compose rectangles are reset when s_fmt is called
resulting in potentially valid rectangles being lost when updating the
format. Fix this by mapping the rectangles inside the new format.
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
return ret;
vin->format = f->fmt.pix;
- vin->crop = crop;
- vin->compose = compose;
+ v4l2_rect_map_inside(&vin->crop, &crop);
+ v4l2_rect_map_inside(&vin->compose, &compose);
vin->src_rect = crop;
return 0;