Revision c40432d3

View differences:

libavdevice/v4l.c
111 111
        }
112 112
    }
113 113

  
114
    if (ioctl(video_fd,VIDIOCGCAP, &s->video_cap) < 0) {
114
    if (ioctl(video_fd, VIDIOCGCAP, &s->video_cap) < 0) {
115 115
        av_log(s1, AV_LOG_ERROR, "VIDIOCGCAP: %s\n", strerror(errno));
116 116
        goto fail;
117 117
    }
......
172 172
            goto fail1;
173 173
    }
174 174

  
175
    if (ioctl(video_fd,VIDIOCGMBUF,&s->gb_buffers) < 0) {
175
    if (ioctl(video_fd, VIDIOCGMBUF, &s->gb_buffers) < 0) {
176 176
        /* try to use read based access */
177 177
        int val;
178 178

  
......
191 191
        s->time_frame = av_gettime() * s->time_base.den / s->time_base.num;
192 192
        s->use_mmap = 0;
193 193
    } else {
194
        s->video_buf = mmap(0,s->gb_buffers.size,PROT_READ|PROT_WRITE,MAP_SHARED,video_fd,0);
194
        s->video_buf = mmap(0, s->gb_buffers.size, PROT_READ|PROT_WRITE, MAP_SHARED, video_fd, 0);
195 195
        if ((unsigned char*)-1 == s->video_buf) {
196
            s->video_buf = mmap(0,s->gb_buffers.size,PROT_READ|PROT_WRITE,MAP_PRIVATE,video_fd,0);
196
            s->video_buf = mmap(0, s->gb_buffers.size, PROT_READ|PROT_WRITE, MAP_PRIVATE, video_fd, 0);
197 197
            if ((unsigned char*)-1 == s->video_buf) {
198 198
                av_log(s1, AV_LOG_ERROR, "mmap: %s\n", strerror(errno));
199 199
                goto fail;
......
213 213
            fail1:
214 214
                av_log(s1, AV_LOG_ERROR, "Fatal: grab device does not support suitable format\n");
215 215
            } else {
216
                av_log(s1, AV_LOG_ERROR,"Fatal: grab device does not receive any video signal\n");
216
                av_log(s1, AV_LOG_ERROR, "Fatal: grab device does not receive any video signal\n");
217 217
            }
218 218
            goto fail;
219 219
        }

Also available in: Unified diff