changeset 2077:4b07eb8709f2 libavformat

Allow avoid setting the video standard and input when capturing v4l2 video. Patch by Limin Wang, edited by me
author lucabe
date Thu, 10 May 2007 10:14:42 +0000
parents 7b4df9e3b6fd
children 17b7ebc3e1f9
files v4l2.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/v4l2.c	Wed May 09 23:07:40 2007 +0000
+++ b/v4l2.c	Thu May 10 10:14:42 2007 +0000
@@ -429,6 +429,7 @@
     struct v4l2_standard standard;
     int i;
 
+    if(ap->channel>=0) {
     /* set tv video input */
     memset (&input, 0, sizeof (input));
     input.index = ap->channel;
@@ -444,7 +445,9 @@
             ap->channel);
         return AVERROR_IO;
     }
+    }
 
+    if(ap->standard) {
     av_log(s1, AV_LOG_DEBUG, "The V4L2 driver set standard: %s\n",
            ap->standard );
     /* set tv standard */
@@ -469,6 +472,7 @@
             ap->standard);
         return AVERROR_IO;
     }
+    }
 
     return 0;
 }