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/dshow/dshow.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'modules/dshow') diff --git a/modules/dshow/dshow.cpp b/modules/dshow/dshow.cpp index 6dc56c1..c687f83 100644 --- a/modules/dshow/dshow.cpp +++ b/modules/dshow/dshow.cpp @@ -23,7 +23,7 @@ const CLSID CLSID_SampleGrabber = { 0xc1f400a0, 0x3f08, 0x11d3, class Grabber; struct vidsrc_st { - struct vidsrc *vs; /* inheritance */ + const struct vidsrc *vs; /* inheritance */ ICaptureGraphBuilder2 *capture; IBaseFilter *grabber_filter; @@ -351,12 +351,10 @@ static void destructor(void *arg) st->graph->Release(); delete st->grab; - - 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, @@ -382,7 +380,7 @@ static int alloc(struct vidsrc_st **stp, struct vidsrc *vs, if (err) goto out; - st->vs = (struct vidsrc *)mem_ref(vs); + st->vs = vs; st->size = *size; st->frameh = frameh; -- cgit v1.2.3