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/decode/vd_lavc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'video/decode') diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 79adc311a9..eab1427bb7 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -546,8 +546,8 @@ static int init(struct dec_video *vd, const char *decoder) ctx->opts = vd->opts; ctx->decoder = talloc_strdup(ctx, decoder); ctx->hwdec_devs = vd->hwdec_devs; - ctx->hwdec_swpool = talloc_steal(ctx, mp_image_pool_new(17)); - ctx->dr_pool = talloc_steal(ctx, mp_image_pool_new(INT_MAX)); + ctx->hwdec_swpool = mp_image_pool_new(ctx); + ctx->dr_pool = mp_image_pool_new(ctx); pthread_mutex_init(&ctx->dr_lock, NULL); -- cgit v1.2.3