summaryrefslogtreecommitdiff
path: root/v4l2-apps/lib/libv4l/libv4l1
diff options
context:
space:
mode:
Diffstat (limited to 'v4l2-apps/lib/libv4l/libv4l1')
-rw-r--r--v4l2-apps/lib/libv4l/libv4l1/libv4l1-priv.h2
-rw-r--r--v4l2-apps/lib/libv4l/libv4l1/libv4l1.c13
-rw-r--r--v4l2-apps/lib/libv4l/libv4l1/v4l1compat.c2
3 files changed, 9 insertions, 8 deletions
diff --git a/v4l2-apps/lib/libv4l/libv4l1/libv4l1-priv.h b/v4l2-apps/lib/libv4l/libv4l1/libv4l1-priv.h
index 7caff68a9..e107581d1 100644
--- a/v4l2-apps/lib/libv4l/libv4l1/libv4l1-priv.h
+++ b/v4l2-apps/lib/libv4l/libv4l1/libv4l1-priv.h
@@ -64,7 +64,7 @@ struct v4l1_dev_info {
unsigned int v4l1_pal; /* VIDEO_PALETTE */
unsigned int v4l2_pixfmt; /* V4L2_PIX_FMT */
unsigned int min_width, min_height, max_width, max_height;
- int width, height;
+ unsigned int width, height;
unsigned char *v4l1_frame_pointer;
};
diff --git a/v4l2-apps/lib/libv4l/libv4l1/libv4l1.c b/v4l2-apps/lib/libv4l/libv4l1/libv4l1.c
index f0604e5c9..7f5e79e3d 100644
--- a/v4l2-apps/lib/libv4l/libv4l1/libv4l1.c
+++ b/v4l2-apps/lib/libv4l/libv4l1/libv4l1.c
@@ -70,9 +70,10 @@
#define V4L1_PIX_SIZE_TOUCHED 0x08
static pthread_mutex_t v4l1_open_mutex = PTHREAD_MUTEX_INITIALIZER;
-static struct v4l1_dev_info devices[V4L1_MAX_DEVICES] = { {-1}, {-1}, {-1},
- {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
- {-1} };
+static struct v4l1_dev_info devices[V4L1_MAX_DEVICES] = { { .fd = -1 },
+ { .fd = -1 }, { .fd = -1 }, { .fd = -1 }, { .fd = -1 }, { .fd = -1 },
+ { .fd = -1 }, { .fd = -1 }, { .fd = -1 }, { .fd = -1 }, { .fd = -1 },
+ { .fd = -1 }, { .fd = -1 }, { .fd = -1 }, { .fd = -1 }, { .fd = -1 }};
static int devices_used = 0;
static unsigned int palette_to_pixelformat(unsigned int palette)
@@ -135,8 +136,8 @@ static unsigned int pixelformat_to_palette(unsigned int pixelformat)
return 0;
}
-static int v4l1_set_format(int index, int width, int height,
- int v4l1_pal, int width_height_may_differ)
+static int v4l1_set_format(int index, unsigned int width,
+ unsigned int height, int v4l1_pal, int width_height_may_differ)
{
int result;
unsigned int v4l2_pixfmt;
@@ -748,7 +749,7 @@ ssize_t v4l1_read(int fd, void* buffer, size_t n)
void *v4l1_mmap(void *start, size_t length, int prot, int flags, int fd,
- off_t offset)
+ __off_t offset)
{
int index;
void *result;
diff --git a/v4l2-apps/lib/libv4l/libv4l1/v4l1compat.c b/v4l2-apps/lib/libv4l/libv4l1/v4l1compat.c
index 3300d56d9..4a4e5c253 100644
--- a/v4l2-apps/lib/libv4l/libv4l1/v4l1compat.c
+++ b/v4l2-apps/lib/libv4l/libv4l1/v4l1compat.c
@@ -77,7 +77,7 @@ ssize_t read(int fd, void* buffer, size_t n)
}
void mmap(void *start, size_t length, int prot, int flags, int fd,
- off_t offset)
+ __off_t offset)
{
return v4l1_mmap(start, length, prot, flags, fd, offset);
}