diff options
author | Alfred E. Heggestad <aeh@db.org> | 2015-06-20 10:01:35 +0200 |
---|---|---|
committer | Alfred E. Heggestad <aeh@db.org> | 2015-06-20 10:01:35 +0200 |
commit | eb6b9567bbcd400773e7801f60dd34b92edace31 (patch) | |
tree | eb3f419966f7bc25e506f823b90680cd52425125 /modules/vidbridge | |
parent | 92f52bf6180f03d0d148cd4db15e07dfb97a5d53 (diff) |
vidsrc: use const pointer to base-class
Diffstat (limited to 'modules/vidbridge')
-rw-r--r-- | modules/vidbridge/src.c | 5 | ||||
-rw-r--r-- | modules/vidbridge/vidbridge.h | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/modules/vidbridge/src.c b/modules/vidbridge/src.c index ff9bf70..5e7d08a 100644 --- a/modules/vidbridge/src.c +++ b/modules/vidbridge/src.c @@ -18,11 +18,10 @@ static void destructor(void *arg) list_unlink(&st->le); mem_deref(st->device); - mem_deref(st->vs); } -int vidbridge_src_alloc(struct vidsrc_st **stp, struct vidsrc *vs, +int vidbridge_src_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, @@ -42,7 +41,7 @@ int vidbridge_src_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; diff --git a/modules/vidbridge/vidbridge.h b/modules/vidbridge/vidbridge.h index 15fcdfc..470e917 100644 --- a/modules/vidbridge/vidbridge.h +++ b/modules/vidbridge/vidbridge.h @@ -6,7 +6,7 @@ struct vidsrc_st { - struct vidsrc *vs; /* inheritance (1st) */ + const struct vidsrc *vs; /* inheritance (1st) */ struct le le; struct vidisp_st *vidisp; @@ -37,7 +37,7 @@ int vidbridge_disp_display(struct vidisp_st *st, const char *title, struct vidisp_st *vidbridge_disp_find(const char *device); -int vidbridge_src_alloc(struct vidsrc_st **stp, struct vidsrc *vs, +int vidbridge_src_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, |