| 315 | } |
| 316 | |
| 317 | static int async_close(URLContext *h) |
| 318 | { |
| 319 | AsyncContext *c = h->priv_data; |
| 320 | int ret; |
| 321 | |
| 322 | pthread_mutex_lock(&c->mutex); |
| 323 | c->abort_request = 1; |
| 324 | pthread_cond_signal(&c->cond_wakeup_background); |
| 325 | pthread_mutex_unlock(&c->mutex); |
| 326 | |
| 327 | ret = pthread_join(c->async_buffer_thread, NULL); |
| 328 | if (ret != 0) |
| 329 | av_log(h, AV_LOG_ERROR, "pthread_join(): %s\n", av_err2str(ret)); |
| 330 | |
| 331 | pthread_cond_destroy(&c->cond_wakeup_background); |
| 332 | pthread_cond_destroy(&c->cond_wakeup_main); |
| 333 | pthread_mutex_destroy(&c->mutex); |
| 334 | ffurl_closep(&c->inner); |
| 335 | ring_destroy(&c->ring); |
| 336 | |
| 337 | return 0; |
| 338 | } |
| 339 | |
| 340 | static int async_read_internal(URLContext *h, void *dest, int size) |
| 341 | { |
nothing calls this directly
no test coverage detected