You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-09-16 08:36:51 +02:00
v4l2: Unify one instance of reading/storing errno
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
@@ -348,14 +348,14 @@ static int mmap_init(AVFormatContext *ctx)
|
|||||||
|
|
||||||
res = ioctl(s->fd, VIDIOC_REQBUFS, &req);
|
res = ioctl(s->fd, VIDIOC_REQBUFS, &req);
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
res = errno;
|
res = AVERROR(errno);
|
||||||
if (errno == EINVAL) {
|
if (res == AVERROR(EINVAL)) {
|
||||||
av_log(ctx, AV_LOG_ERROR, "Device does not support mmap\n");
|
av_log(ctx, AV_LOG_ERROR, "Device does not support mmap\n");
|
||||||
} else {
|
} else {
|
||||||
av_log(ctx, AV_LOG_ERROR, "ioctl(VIDIOC_REQBUFS)\n");
|
av_log(ctx, AV_LOG_ERROR, "ioctl(VIDIOC_REQBUFS)\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return AVERROR(res);
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (req.count < 2) {
|
if (req.count < 2) {
|
||||||
|
Reference in New Issue
Block a user