Commit 7e12ffca authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

v4l2: reset crop after selecting the format

Cropping depends on the image resolution, which is selected while
setting the format.
parent 076851b7
...@@ -758,7 +758,6 @@ int SetupInput (vlc_object_t *obj, int fd) ...@@ -758,7 +758,6 @@ int SetupInput (vlc_object_t *obj, int fd)
msg_Dbg (obj, "selected input %"PRIu32, input.index); msg_Dbg (obj, "selected input %"PRIu32, input.index);
SetupStandard (obj, fd, &input); SetupStandard (obj, fd, &input);
ResetCrop (obj, fd); /* crop depends on standard */
SetupTuner (obj, fd, &input); SetupTuner (obj, fd, &input);
SetupAudio (obj, fd, &input); SetupAudio (obj, fd, &input);
return 0; return 0;
...@@ -970,6 +969,7 @@ int SetupFormat (vlc_object_t *obj, int fd, uint32_t fourcc, ...@@ -970,6 +969,7 @@ int SetupFormat (vlc_object_t *obj, int fd, uint32_t fourcc,
} }
if (v4l2_ioctl (fd, VIDIOC_S_PARM, parm) < 0) if (v4l2_ioctl (fd, VIDIOC_S_PARM, parm) < 0)
msg_Warn (obj, "cannot set streaming parameters: %m"); msg_Warn (obj, "cannot set streaming parameters: %m");
ResetCrop (obj, fd); /* crop depends on frame size */
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment