summaryrefslogtreecommitdiff
path: root/libavformat/v4l2.c
diff options
context:
space:
mode:
authorLimin Wang <lance.lmwang@gmail.com>2007-05-10 10:14:42 +0000
committerLuca Abeni <lucabe72@email.it>2007-05-10 10:14:42 +0000
commit0d6c07329e6a1764bd135b7b30cccba76d14e6cb (patch)
tree92f8c3ac78ed3c226811db7590427cafb70b5bd3 /libavformat/v4l2.c
parent5ecb0677a26c8a59bd1c7971d815779817f3047d (diff)
Allow avoid setting the video standard and input when capturing v4l2 video.
Patch by Limin Wang, edited by me Originally committed as revision 8971 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/v4l2.c')
-rw-r--r--libavformat/v4l2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/v4l2.c b/libavformat/v4l2.c
index aeaac33472..060d30a94d 100644
--- a/libavformat/v4l2.c
+++ b/libavformat/v4l2.c
@@ -429,6 +429,7 @@ static int v4l2_set_parameters( AVFormatContext *s1, AVFormatParameters *ap )
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 @@ static int v4l2_set_parameters( AVFormatContext *s1, AVFormatParameters *ap )
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 @@ static int v4l2_set_parameters( AVFormatContext *s1, AVFormatParameters *ap )
ap->standard);
return AVERROR_IO;
}
+ }
return 0;
}