# HG changeset patch # User lucabe # Date 1178792115 0 # Node ID 17b7ebc3e1f9bbf0912477059d8d7bafdc43d4b4 # Parent 4b07eb8709f26888b04324aec1517226ffb4e3ed Reindent code after last commit diff -r 4b07eb8709f2 -r 17b7ebc3e1f9 v4l2.c --- a/v4l2.c Thu May 10 10:14:42 2007 +0000 +++ b/v4l2.c Thu May 10 10:15:15 2007 +0000 @@ -430,48 +430,48 @@ 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;