diff options
author | wm4 <wm4@nowhere> | 2015-02-11 11:26:23 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-02-11 11:36:07 +0100 |
commit | 67aeccc25448969eb523224114daea2f9a5a3a87 (patch) | |
tree | 5f2e55190f6312d7b757eab2b7e07a044a3057af /audio/audio.c | |
parent | b6ab34fc98a4f839a505d3410b87a40286ed2ccc (diff) | |
download | mpv-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/audio.c')
-rw-r--r-- | audio/audio.c | 3 |
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); |