summaryrefslogtreecommitdiff
path: root/modules/x11grab
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2015-06-20 10:01:35 +0200
committerAlfred E. Heggestad <aeh@db.org>2015-06-20 10:01:35 +0200
commiteb6b9567bbcd400773e7801f60dd34b92edace31 (patch)
treeeb3f419966f7bc25e506f823b90680cd52425125 /modules/x11grab
parent92f52bf6180f03d0d148cd4db15e07dfb97a5d53 (diff)
vidsrc: use const pointer to base-class
Diffstat (limited to 'modules/x11grab')
-rw-r--r--modules/x11grab/x11grab.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/x11grab/x11grab.c b/modules/x11grab/x11grab.c
index 93477a5..d1e0fd9 100644
--- a/modules/x11grab/x11grab.c
+++ b/modules/x11grab/x11grab.c
@@ -22,7 +22,7 @@
struct vidsrc_st {
- struct vidsrc *vs; /* inheritance */
+ const struct vidsrc *vs; /* inheritance */
Display *disp;
XImage *image;
pthread_t thread;
@@ -144,12 +144,10 @@ static void destructor(void *arg)
if (st->disp)
XCloseDisplay(st->disp);
-
- mem_deref(st->vs);
}
-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,
@@ -170,7 +168,7 @@ static int alloc(struct vidsrc_st **stp, struct vidsrc *vs,
if (!st)
return ENOMEM;
- st->vs = mem_ref(vs);
+ st->vs = vs;
st->size = *size;
st->fps = prm->fps;
st->frameh = frameh;