summaryrefslogtreecommitdiff
path: root/libavcodec/v4l2_context.c
diff options
context:
space:
mode:
authorAman Gupta <aman@tmm1.net>2019-08-22 12:20:56 -0700
committerAman Gupta <aman@tmm1.net>2019-09-02 15:06:22 -0700
commit87daee944b119299c9057440c71aa4a524ef5734 (patch)
tree89214455ca7fc86c7ea46a33a95fe0b7bb0096a5 /libavcodec/v4l2_context.c
parent7b092a074be8f8c9a7578afdbb9a57992deb1913 (diff)
avcodec/v4l2_context: log VIDIOC_REQBUFS failures
Signed-off-by: Aman Gupta <aman@tmm1.net>
Diffstat (limited to 'libavcodec/v4l2_context.c')
-rw-r--r--libavcodec/v4l2_context.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/v4l2_context.c b/libavcodec/v4l2_context.c
index efcb0426e4..4958c634bf 100644
--- a/libavcodec/v4l2_context.c
+++ b/libavcodec/v4l2_context.c
@@ -678,8 +678,10 @@ int ff_v4l2_context_init(V4L2Context* ctx)
req.memory = V4L2_MEMORY_MMAP;
req.type = ctx->type;
ret = ioctl(s->fd, VIDIOC_REQBUFS, &req);
- if (ret < 0)
+ if (ret < 0) {
+ av_log(logger(ctx), AV_LOG_ERROR, "%s VIDIOC_REQBUFS failed: %s\n", ctx->name, strerror(errno));
return AVERROR(errno);
+ }
ctx->num_buffers = req.count;
ctx->buffers = av_mallocz(ctx->num_buffers * sizeof(V4L2Buffer));