From: Antoine Cellerier Date: Sat, 3 Oct 2009 17:17:51 +0000 (+0200) Subject: Work around what seems to be a driver bug when auto detecting the optimal capture... X-Git-Tag: 1.1.0-ff~3053 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=3959817d628eda76bb3d523cf18e5160fa078111;p=vlc Work around what seems to be a driver bug when auto detecting the optimal capture size. --- diff --git a/modules/access/v4l2.c b/modules/access/v4l2.c index 3aaf3e4f02..bebccd0e3e 100644 --- a/modules/access/v4l2.c +++ b/modules/access/v4l2.c @@ -2005,8 +2005,8 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux ) msg_Dbg( p_obj, "trying specified size %dx%d", p_sys->i_width, p_sys->i_height ); } - fmt.fmt.pix.width = p_sys->i_width; - fmt.fmt.pix.height = p_sys->i_height; + fmt.fmt.pix.width = __MAX(0, p_sys->i_width); + fmt.fmt.pix.height = __MAX(0, p_sys->i_height); fmt.fmt.pix.field = V4L2_FIELD_NONE; if (b_demux)