summaryrefslogtreecommitdiff
path: root/v4l2-apps/libv4l/libv4l2/libv4l2.c
diff options
context:
space:
mode:
Diffstat (limited to 'v4l2-apps/libv4l/libv4l2/libv4l2.c')
-rw-r--r--v4l2-apps/libv4l/libv4l2/libv4l2.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/v4l2-apps/libv4l/libv4l2/libv4l2.c b/v4l2-apps/libv4l/libv4l2/libv4l2.c
index 314087255..2685b9e19 100644
--- a/v4l2-apps/libv4l/libv4l2/libv4l2.c
+++ b/v4l2-apps/libv4l/libv4l2/libv4l2.c
@@ -793,8 +793,12 @@ int v4l2_ioctl (int fd, unsigned long int request, ...)
&src_fmt);
}
- if (result)
+ if (result) {
+ saved_err = errno;
+ V4L2_LOG("S_FMT error trying format: %s\n", strerror(errno));
+ errno = saved_err;
break;
+ }
if (src_fmt.fmt.pix.pixelformat != dest_fmt->fmt.pix.pixelformat &&
v4l2_log_file) {