summaryrefslogtreecommitdiffstats
path: root/video/decode
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-01-12 01:40:01 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-01-13 03:26:45 -0800
commit83ab873497e8b295d32ee364ef64c4533db5a048 (patch)
tree1185a249ac7c49d8b5859830c98b25abae6a63ae /video/decode
parentd53c0604ca796020e5ac26f08c0d6fd0c8201718 (diff)
downloadmpv-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/decode')
-rw-r--r--video/decode/vd_lavc.c4
1 files changed, 2 insertions, 2 deletions
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);