diff options
author | wm4 <wm4@nowhere> | 2018-01-12 01:40:01 +0100 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2018-01-13 03:26:45 -0800 |
commit | 83ab873497e8b295d32ee364ef64c4533db5a048 (patch) | |
tree | 1185a249ac7c49d8b5859830c98b25abae6a63ae /video/filter | |
parent | d53c0604ca796020e5ac26f08c0d6fd0c8201718 (diff) | |
download | mpv-83ab873497e8b295d32ee364ef64c4533db5a048.tar.bz2 mpv-83ab873497e8b295d32ee364ef64c4533db5a048.tar.xz |
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.
Diffstat (limited to 'video/filter')
-rw-r--r-- | video/filter/vf.c | 2 | ||||
-rw-r--r-- | video/filter/vf_d3d11vpp.c | 2 |
2 files changed, 2 insertions, 2 deletions
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); |