From 20d5efb419408086e104f0e8da21f512c17a26e1 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 11 Feb 2015 11:26:23 +0100 Subject: [PATCH] audio: fix pool allocation It reallocated the pool on every request, making the pool completely useless. Oops. --- audio/audio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/audio/audio.c b/audio/audio.c index 57eb9ca20f..e5df25a6ad 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -370,7 +370,8 @@ struct mp_audio *mp_audio_pool_get(struct mp_audio_pool *pool, if (alloc >= INT_MAX) return NULL; av_buffer_pool_uninit(&pool->avpool); - pool->avpool = av_buffer_pool_init(alloc, NULL); + pool->element_size = alloc; + pool->avpool = av_buffer_pool_init(pool->element_size, NULL); if (!pool->avpool) return NULL; talloc_set_destructor(pool, mp_audio_pool_destructor);