summaryrefslogtreecommitdiff
path: root/modules/dshow
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/dshow
parent92f52bf6180f03d0d148cd4db15e07dfb97a5d53 (diff)
vidsrc: use const pointer to base-class
Diffstat (limited to 'modules/dshow')
-rw-r--r--modules/dshow/dshow.cpp8
1 files changed, 3 insertions, 5 deletions
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;