+#else
+ ff_mutex_lock(&pool->mutex);
+ buf = pool->pool;
+ if (buf) {
+ ret = av_buffer_create(buf->data, pool->size, pool_release_buffer,
+ buf, 0);
+ if (ret) {
+ pool->pool = buf->next;
+ buf->next = NULL;
+ }
+ } else {
+ ret = pool_alloc_buffer(pool);
+ }
+ ff_mutex_unlock(&pool->mutex);
+#endif
+
+ if (ret)
+ avpriv_atomic_int_add_and_fetch(&pool->refcount, 1);