From eb6b9567bbcd400773e7801f60dd34b92edace31 Mon Sep 17 00:00:00 2001 From: "Alfred E. Heggestad" Date: Sat, 20 Jun 2015 10:01:35 +0200 Subject: vidsrc: use const pointer to base-class --- modules/qtcapture/qtcapture.m | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'modules/qtcapture') diff --git a/modules/qtcapture/qtcapture.m b/modules/qtcapture/qtcapture.m index b5fce0e..08f66ab 100644 --- a/modules/qtcapture/qtcapture.m +++ b/modules/qtcapture/qtcapture.m @@ -25,7 +25,7 @@ static struct vidsrc *vidsrc; struct vidsrc_st { - struct vidsrc *vs; /* inheritance */ + const struct vidsrc *vs; /* inheritance */ qtcap *cap; struct lock *lock; @@ -277,8 +277,6 @@ static void destructor(void *arg) mem_deref(st->buf); mem_deref(st->lock); - - mem_deref(st->vs); } @@ -299,7 +297,7 @@ static void tmr_handler(void *arg) #endif -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, @@ -320,7 +318,7 @@ static int alloc(struct vidsrc_st **stp, struct vidsrc *vs, if (!st) return ENOMEM; - st->vs = mem_ref(vs); + st->vs = vs; st->frameh = frameh; st->arg = arg; -- cgit v1.2.3