s->fd = video_fd;
s->frame_size = frame_size;
+ st->codec.codec_type = CODEC_TYPE_VIDEO;
st->codec.codec_id = CODEC_ID_RAWVIDEO;
st->codec.width = width;
st->codec.height = height;
/* Setup to capture the next frame */
gb_buf.frame = (gb_frame + 1) % gb_buffers.frames;
if (ioctl(s->fd, VIDIOCMCAPTURE, &gb_buf) < 0) {
- if (errno == EAGAIN)
- fprintf(stderr,"Cannot Sync\n");
- else
+ if (errno == EAGAIN)
+ fprintf(stderr,"Cannot Sync\n");
+ else
perror("VIDIOCMCAPTURE");
- return -EIO;
+ return -EIO;
}
gettimeofday(&tv_s, 0);