mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 03:59:43 +00:00
v4l2: Unify one instance of reading/storing errno
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
28396d17ff
commit
b776113e5d
@ -348,14 +348,14 @@ static int mmap_init(AVFormatContext *ctx)
|
||||
|
||||
res = ioctl(s->fd, VIDIOC_REQBUFS, &req);
|
||||
if (res < 0) {
|
||||
res = errno;
|
||||
if (errno == EINVAL) {
|
||||
res = AVERROR(errno);
|
||||
if (res == AVERROR(EINVAL)) {
|
||||
av_log(ctx, AV_LOG_ERROR, "Device does not support mmap\n");
|
||||
} else {
|
||||
av_log(ctx, AV_LOG_ERROR, "ioctl(VIDIOC_REQBUFS)\n");
|
||||
}
|
||||
|
||||
return AVERROR(res);
|
||||
return res;
|
||||
}
|
||||
|
||||
if (req.count < 2) {
|
||||
|
Loading…
Reference in New Issue
Block a user