From 83ab873497e8b295d32ee364ef64c4533db5a048 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 12 Jan 2018 01:40:01 +0100 Subject: video: change some mp_image_pool semantics Remove the max_count creation parameter, because it's pointless and rarely ever did anything. Add a talloc parent parameter instead (which is something completely different, but convenient, and all callers needs to be changed anyway). Instead of clearing the pool when the now removed maximum is reached, clear it on image parameter changes instead. --- video/filter/vf.c | 2 +- video/filter/vf_d3d11vpp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'video/filter') diff --git a/video/filter/vf.c b/video/filter/vf.c index 48a6e9a3a6..d5df466ba8 100644 --- a/video/filter/vf.c +++ b/video/filter/vf.c @@ -233,7 +233,7 @@ static struct vf_instance *vf_open(struct vf_chain *c, const char *name, .log = mp_log_new(vf, c->log, name), .hwdec_devs = c->hwdec_devs, .query_format = vf_default_query_format, - .out_pool = talloc_steal(vf, mp_image_pool_new(16)), + .out_pool = mp_image_pool_new(vf), .chain = c, }; struct m_config *config = diff --git a/video/filter/vf_d3d11vpp.c b/video/filter/vf_d3d11vpp.c index f49af06424..3be49ede80 100644 --- a/video/filter/vf_d3d11vpp.c +++ b/video/filter/vf_d3d11vpp.c @@ -412,7 +412,7 @@ static int reconfig(struct vf_instance *vf, struct mp_image_params *in, p->params = *in; p->out_params = *out; - p->pool = mp_image_pool_new(20); + p->pool = mp_image_pool_new(vf); mp_image_pool_set_allocator(p->pool, alloc_pool, vf); mp_image_pool_set_lru(p->pool); -- cgit v1.2.3