if (aiw_init(s) < 0)
goto fail;
s->aiw_enabled = 1;
- /* force 420P format because convertion from YUV422 to YUV420P
+ /* force 420P format because conversion from YUV422 to YUV420P
is done in this driver (ugly) */
s->frame_format = VIDEO_PALETTE_YUV420P;
}
if (video_fd >= 0)
close(video_fd);
av_free(st);
- return AVERROR_IO;
+ return AVERROR(EIO);
}
static int v4l_mm_read_picture(VideoData *s, uint8_t *buf)
av_log(NULL, AV_LOG_ERROR, "Cannot Sync\n");
else
perror("VIDIOCMCAPTURE");
- return AVERROR_IO;
+ return AVERROR(EIO);
}
/* This is now the grabbing frame */
}
if (av_new_packet(pkt, s->frame_size) < 0)
- return AVERROR_IO;
+ return AVERROR(EIO);
pkt->pts = curtime;
return v4l_mm_read_picture(s, pkt->data);
} else {
if (read(s->fd, pkt->data, pkt->size) != pkt->size)
- return AVERROR_IO;
+ return AVERROR(EIO);
return s->frame_size;
}
}