[vlc-devel] commit: Work around what seems to be a driver bug when auto detecting the optimal capture size . (Antoine Cellerier )

git version control git at videolan.org
Sat Oct 3 19:18:25 CEST 2009


vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Sat Oct  3 19:17:51 2009 +0200| [3959817d628eda76bb3d523cf18e5160fa078111] | committer: Antoine Cellerier 

Work around what seems to be a driver bug when auto detecting the optimal capture size.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3959817d628eda76bb3d523cf18e5160fa078111
---

 modules/access/v4l2.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/access/v4l2.c b/modules/access/v4l2.c
index 3aaf3e4..bebccd0 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)




More information about the vlc-devel mailing list