[vlc-commits] v4l2: reset crop after selecting the format
Rémi Denis-Courmont
git at videolan.org
Tue Apr 10 18:44:03 CEST 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Apr 10 19:43:10 2012 +0300| [7e12ffcadca795a655d5fd31787800079b40f8f5] | committer: Rémi Denis-Courmont
v4l2: reset crop after selecting the format
Cropping depends on the image resolution, which is selected while
setting the format.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7e12ffcadca795a655d5fd31787800079b40f8f5
---
modules/access/v4l2/video.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules/access/v4l2/video.c b/modules/access/v4l2/video.c
index ef66048..1f4ad43 100644
--- a/modules/access/v4l2/video.c
+++ b/modules/access/v4l2/video.c
@@ -758,7 +758,6 @@ int SetupInput (vlc_object_t *obj, int fd)
msg_Dbg (obj, "selected input %"PRIu32, input.index);
SetupStandard (obj, fd, &input);
- ResetCrop (obj, fd); /* crop depends on standard */
SetupTuner (obj, fd, &input);
SetupAudio (obj, fd, &input);
return 0;
@@ -970,6 +969,7 @@ int SetupFormat (vlc_object_t *obj, int fd, uint32_t fourcc,
}
if (v4l2_ioctl (fd, VIDIOC_S_PARM, parm) < 0)
msg_Warn (obj, "cannot set streaming parameters: %m");
+ ResetCrop (obj, fd); /* crop depends on frame size */
return 0;
}
More information about the vlc-commits
mailing list