summaryrefslogtreecommitdiff
path: root/modules/v4l/v4l.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/v4l/v4l.c')
-rw-r--r--modules/v4l/v4l.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/v4l/v4l.c b/modules/v4l/v4l.c
index 1f3e760..93b84fa 100644
--- a/modules/v4l/v4l.c
+++ b/modules/v4l/v4l.c
@@ -20,7 +20,7 @@
struct vidsrc_st {
- struct vidsrc *vs; /* inheritance */
+ const struct vidsrc *vs; /* inheritance */
int fd;
pthread_t thread;
@@ -156,7 +156,6 @@ static void destructor(void *arg)
close(st->fd);
mem_deref(st->mb);
- mem_deref(st->vs);
}
@@ -166,7 +165,7 @@ static uint32_t rgb24_size(const struct vidsz *sz)
}
-static int alloc(struct vidsrc_st **stp, struct vidsrc *vs,
+static int alloc(struct vidsrc_st **stp, const struct vidsrc *vs,
struct media_ctx **ctx, struct vidsrc_prm *prm,
const struct vidsz *size, const char *fmt,
const char *dev, vidsrc_frame_h *frameh,
@@ -190,7 +189,7 @@ static int alloc(struct vidsrc_st **stp, struct vidsrc *vs,
if (!st)
return ENOMEM;
- st->vs = mem_ref(vs);
+ st->vs = vs;
st->fd = -1;
st->size = *size;
st->frameh = frameh;