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

Function avcodec_thread_free

libavcodec/pthread.c:87–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87void avcodec_thread_free(AVCodecContext *avctx)
88{
89 ThreadContext *c = avctx->thread_opaque;
90 int i;
91
92 pthread_mutex_lock(&c->current_job_lock);
93 c->done = 1;
94 pthread_cond_broadcast(&c->current_job_cond);
95 pthread_mutex_unlock(&c->current_job_lock);
96
97 for (i=0; i<avctx->thread_count; i++)
98 pthread_join(c->workers[i], NULL);
99
100 pthread_mutex_destroy(&c->current_job_lock);
101 pthread_cond_destroy(&c->current_job_cond);
102 pthread_cond_destroy(&c->last_job_cond);
103 av_free(c->workers);
104 av_freep(&avctx->thread_opaque);
105}
106
107static int avcodec_thread_execute(AVCodecContext *avctx, action_func* func, void *arg, int *ret, int job_count, int job_size)
108{

Callers 2

avcodec_closeFunction · 0.70
avcodec_thread_initFunction · 0.70

Calls 2

av_freeFunction · 0.85
av_freepFunction · 0.85

Tested by

no test coverage detected