aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/v4l2.c
diff options
context:
space:
mode:
authorLuca Abeni <lucabe72@email.it>2007-05-10 10:15:15 +0000
committerLuca Abeni <lucabe72@email.it>2007-05-10 10:15:15 +0000
commite4dd03f39585b76a1349214730ad7f1672f6e991 (patch)
tree10db262f1db0eb7c29d76bde1835fde0ecc4aab8 /libavformat/v4l2.c
parent82dc348bd18f76d9aa8c3fc5000ace659688e780 (diff)
downloadffmpeg-e4dd03f39585b76a1349214730ad7f1672f6e991.tar.gz
Reindent code after last commit
Originally committed as revision 8973 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/v4l2.c')
-rw-r--r--libavformat/v4l2.c68
1 files changed, 34 insertions, 34 deletions
diff --git a/libavformat/v4l2.c b/libavformat/v4l2.c
index 060d30a94d..b3d7e01cf5 100644
--- a/libavformat/v4l2.c
+++ b/libavformat/v4l2.c
@@ -430,48 +430,48 @@ static int v4l2_set_parameters( AVFormatContext *s1, AVFormatParameters *ap )
int i;
if(ap->channel>=0) {
- /* set tv video input */
- memset (&input, 0, sizeof (input));
- input.index = ap->channel;
- if(ioctl (s->fd, VIDIOC_ENUMINPUT, &input) < 0) {
- av_log(s1, AV_LOG_ERROR, "The V4L2 driver ioctl enum input failed:\n");
- return AVERROR_IO;
- }
+ /* set tv video input */
+ memset (&input, 0, sizeof (input));
+ input.index = ap->channel;
+ if(ioctl (s->fd, VIDIOC_ENUMINPUT, &input) < 0) {
+ av_log(s1, AV_LOG_ERROR, "The V4L2 driver ioctl enum input failed:\n");
+ return AVERROR_IO;
+ }
- av_log(s1, AV_LOG_DEBUG, "The V4L2 driver set input_id: %d, input: %s\n",
- ap->channel, input.name);
- if(ioctl (s->fd, VIDIOC_S_INPUT, &input.index) < 0 ) {
- av_log(s1, AV_LOG_ERROR, "The V4L2 driver ioctl set input(%d) failed\n",
- ap->channel);
- return AVERROR_IO;
- }
+ av_log(s1, AV_LOG_DEBUG, "The V4L2 driver set input_id: %d, input: %s\n",
+ ap->channel, input.name);
+ if(ioctl (s->fd, VIDIOC_S_INPUT, &input.index) < 0 ) {
+ av_log(s1, AV_LOG_ERROR, "The V4L2 driver ioctl set input(%d) failed\n",
+ 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 */
- memset (&standard, 0, sizeof (standard));
- for(i=0;;i++) {
- standard.index = i;
- if (ioctl(s->fd, VIDIOC_ENUMSTD, &standard) < 0) {
+ av_log(s1, AV_LOG_DEBUG, "The V4L2 driver set standard: %s\n",
+ ap->standard );
+ /* set tv standard */
+ memset (&standard, 0, sizeof (standard));
+ for(i=0;;i++) {
+ standard.index = i;
+ if (ioctl(s->fd, VIDIOC_ENUMSTD, &standard) < 0) {
+ av_log(s1, AV_LOG_ERROR, "The V4L2 driver ioctl set standard(%s) failed\n",
+ ap->standard);
+ return AVERROR_IO;
+ }
+
+ if(!strcasecmp(standard.name, ap->standard)) {
+ break;
+ }
+ }
+
+ av_log(s1, AV_LOG_DEBUG, "The V4L2 driver set standard: %s, id: %"PRIu64"\n",
+ ap->standard, standard.id);
+ if (ioctl(s->fd, VIDIOC_S_STD, &standard.id) < 0) {
av_log(s1, AV_LOG_ERROR, "The V4L2 driver ioctl set standard(%s) failed\n",
ap->standard);
return AVERROR_IO;
}
-
- if(!strcasecmp(standard.name, ap->standard)) {
- break;
- }
- }
-
- av_log(s1, AV_LOG_DEBUG, "The V4L2 driver set standard: %s, id: %"PRIu64"\n",
- ap->standard, standard.id);
- if (ioctl(s->fd, VIDIOC_S_STD, &standard.id) < 0) {
- av_log(s1, AV_LOG_ERROR, "The V4L2 driver ioctl set standard(%s) failed\n",
- ap->standard);
- return AVERROR_IO;
- }
}
return 0;