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

Function executor_free

libavutil/executor.c:119–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117#endif
118
119static void executor_free(AVExecutor *e, const int has_lock, const int has_cond)
120{
121 if (e->thread_count) {
122 //signal die
123 ff_mutex_lock(&e->lock);
124 e->die = 1;
125 ff_cond_broadcast(&e->cond);
126 ff_mutex_unlock(&e->lock);
127
128 for (int i = 0; i < e->thread_count; i++)
129 executor_thread_join(e->threads[i].thread, NULL);
130 }
131 if (has_cond)
132 ff_cond_destroy(&e->cond);
133 if (has_lock)
134 ff_mutex_destroy(&e->lock);
135
136 av_free(e->threads);
137 av_free(e->local_contexts);
138
139 av_free(e);
140}
141
142AVExecutor* av_executor_alloc(const AVTaskCallbacks *cb, int thread_count)
143{

Callers 2

av_executor_allocFunction · 0.70
av_executor_freeFunction · 0.70

Calls 6

ff_mutex_lockFunction · 0.85
ff_cond_broadcastFunction · 0.85
ff_mutex_unlockFunction · 0.85
ff_cond_destroyFunction · 0.85
ff_mutex_destroyFunction · 0.85
av_freeFunction · 0.70

Tested by

no test coverage detected