Work around what seems to be a driver bug when auto detecting the optimal capture...
authorAntoine Cellerier <dionoea@videolan.org>
Sat, 3 Oct 2009 17:17:51 +0000 (19:17 +0200)
committerAntoine Cellerier <dionoea@videolan.org>
Sat, 3 Oct 2009 17:17:51 +0000 (19:17 +0200)
modules/access/v4l2.c

index 3aaf3e4..bebccd0 100644 (file)
@@ -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)