提交 0d6c0732 编写于 作者: L Limin Wang 提交者: Luca Abeni

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
上级 5ecb0677
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册