aboutsummaryrefslogtreecommitdiffstats
path: root/libng
diff options
context:
space:
mode:
Diffstat (limited to 'libng')
-rw-r--r--libng/plugins/drv0-v4l2.c1
-rw-r--r--libng/writefile.c9
2 files changed, 6 insertions, 4 deletions
diff --git a/libng/plugins/drv0-v4l2.c b/libng/plugins/drv0-v4l2.c
index 3954123..b8eb3f4 100644
--- a/libng/plugins/drv0-v4l2.c
+++ b/libng/plugins/drv0-v4l2.c
@@ -342,6 +342,7 @@ v4l2_add_attr(struct v4l2_handle *h, struct v4l2_queryctrl *ctl,
h->attr[h->nattr].choices = v4l2_menu(h->fd, ctl);
break;
default:
+ memset(h->attr+h->nattr,0,sizeof(struct ng_attribute)*2);
return;
}
} else {
diff --git a/libng/writefile.c b/libng/writefile.c
index 92516e9..92f6404 100644
--- a/libng/writefile.c
+++ b/libng/writefile.c
@@ -18,6 +18,7 @@
#include <fcntl.h>
#include <jpeglib.h>
#include <pthread.h>
+#include <inttypes.h>
#include <sys/types.h>
#include <sys/param.h>
#include "byteswap.h"
@@ -178,10 +179,10 @@ int write_pgm(char *filename, struct ng_video_buf *buf)
/* Copyright (C) by Heiko Eissfeldt */
-typedef unsigned char BYTE;
-typedef unsigned short WORD;
-typedef unsigned long DWORD;
-typedef unsigned long FOURCC; /* a four character code */
+typedef uint8_t BYTE;
+typedef uint16_t WORD;
+typedef uint32_t DWORD;
+typedef uint32_t FOURCC; /* a four character code */
/* flags for 'wFormatTag' field of WAVEFORMAT */
#define WAVE_FORMAT_PCM 1

Privacy Policy