| 326 | } |
| 327 | |
| 328 | void av_buffer_pool_uninit(AVBufferPool **ppool) |
| 329 | { |
| 330 | AVBufferPool *pool; |
| 331 | |
| 332 | if (!ppool || !*ppool) |
| 333 | return; |
| 334 | pool = *ppool; |
| 335 | *ppool = NULL; |
| 336 | |
| 337 | ff_mutex_lock(&pool->mutex); |
| 338 | buffer_pool_flush(pool); |
| 339 | ff_mutex_unlock(&pool->mutex); |
| 340 | |
| 341 | if (atomic_fetch_sub_explicit(&pool->refcount, 1, memory_order_acq_rel) == 1) |
| 342 | buffer_pool_free(pool); |
| 343 | } |
| 344 | |
| 345 | static void pool_release_buffer(void *opaque, uint8_t *data) |
| 346 | { |
no test coverage detected