MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / async_close

Function async_close

libavformat/async.c:317–338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

315}
316
317static 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
340static int async_read_internal(URLContext *h, void *dest, int size)
341{

Callers

nothing calls this directly

Calls 9

av_logFunction · 0.85
ffurl_closepFunction · 0.85
ring_destroyFunction · 0.85
pthread_mutex_lockFunction · 0.50
pthread_cond_signalFunction · 0.50
pthread_mutex_unlockFunction · 0.50
pthread_joinFunction · 0.50
pthread_cond_destroyFunction · 0.50
pthread_mutex_destroyFunction · 0.50

Tested by

no test coverage detected