Commit 8a8d92e5 authored by lucabe's avatar lucabe

Allow avoid setting the video standard and input when capturing v4l2 video.

Patch by Limin Wang, edited by me


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@8971 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent a85708c8
...@@ -429,6 +429,7 @@ static int v4l2_set_parameters( AVFormatContext *s1, AVFormatParameters *ap ) ...@@ -429,6 +429,7 @@ static int v4l2_set_parameters( AVFormatContext *s1, AVFormatParameters *ap )
struct v4l2_standard standard; struct v4l2_standard standard;
int i; int i;
if(ap->channel>=0) {
/* set tv video input */ /* set tv video input */
memset (&input, 0, sizeof (input)); memset (&input, 0, sizeof (input));
input.index = ap->channel; input.index = ap->channel;
...@@ -444,7 +445,9 @@ static int v4l2_set_parameters( AVFormatContext *s1, AVFormatParameters *ap ) ...@@ -444,7 +445,9 @@ static int v4l2_set_parameters( AVFormatContext *s1, AVFormatParameters *ap )
ap->channel); ap->channel);
return AVERROR_IO; return AVERROR_IO;
} }
}
if(ap->standard) {
av_log(s1, AV_LOG_DEBUG, "The V4L2 driver set standard: %s\n", av_log(s1, AV_LOG_DEBUG, "The V4L2 driver set standard: %s\n",
ap->standard ); ap->standard );
/* set tv standard */ /* set tv standard */
...@@ -469,6 +472,7 @@ static int v4l2_set_parameters( AVFormatContext *s1, AVFormatParameters *ap ) ...@@ -469,6 +472,7 @@ static int v4l2_set_parameters( AVFormatContext *s1, AVFormatParameters *ap )
ap->standard); ap->standard);
return AVERROR_IO; return AVERROR_IO;
} }
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment