mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
media: rockchip: vicap fixed error of get_selection
when result of --get-compose is success, but width/height equal 0, may cause v4l2-ctl unable to save image Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com> Change-Id: Ibe572b53da346aef233a15c70c6050ad2207a21d
This commit is contained in:
@@ -5770,9 +5770,7 @@ static int rkcif_g_selection(struct file *file, void *fh,
|
||||
s->r.width = stream->pixm.width;
|
||||
s->r.height = stream->pixm.height;
|
||||
}
|
||||
}
|
||||
|
||||
if (s->target == V4L2_SEL_TGT_CROP) {
|
||||
} else if (s->target == V4L2_SEL_TGT_CROP) {
|
||||
if (stream->crop_mask & (CROP_SRC_USR_MASK | CROP_SRC_SENSOR_MASK)) {
|
||||
s->r = stream->crop[CROP_SRC_ACT];
|
||||
} else {
|
||||
@@ -5781,6 +5779,8 @@ static int rkcif_g_selection(struct file *file, void *fh,
|
||||
s->r.width = stream->pixm.width;
|
||||
s->r.height = stream->pixm.height;
|
||||
}
|
||||
} else {
|
||||
goto err;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user