summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-02-11 11:26:23 +0100
committerwm4 <wm4@nowhere>2015-02-11 11:36:07 +0100
commit67aeccc25448969eb523224114daea2f9a5a3a87 (patch)
tree5f2e55190f6312d7b757eab2b7e07a044a3057af /audio
parentb6ab34fc98a4f839a505d3410b87a40286ed2ccc (diff)
downloadmpv-67aeccc25448969eb523224114daea2f9a5a3a87.tar.bz2
mpv-67aeccc25448969eb523224114daea2f9a5a3a87.tar.xz
audio: fix pool allocation
It reallocated the pool on every request, making the pool completely useless. Oops.
Diffstat (limited to 'audio')
-rw-r--r--audio/audio.c3
1 files changed, 2 insertions, 1 deletions
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);