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

Function ff_pthread_free

libavcodec/pthread.c:92–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92av_cold void ff_pthread_free(void *obj, const unsigned offsets[])
93{
94 unsigned cnt = *(unsigned*)((char*)obj + offsets[0]);
95 const unsigned *cur_offset = offsets;
96
97 *(unsigned*)((char*)obj + offsets[0]) = 0;
98
99 for (; *(++cur_offset) != THREAD_SENTINEL && cnt; cnt--)
100 pthread_mutex_destroy((pthread_mutex_t*)((char*)obj + *cur_offset));
101 for (; *(++cur_offset) != THREAD_SENTINEL && cnt; cnt--)
102 pthread_cond_destroy ((pthread_cond_t *)((char*)obj + *cur_offset));
103}
104
105av_cold int ff_pthread_init(void *obj, const unsigned offsets[])
106{

Callers 7

ff_frame_thread_freeFunction · 0.85
ff_frame_thread_initFunction · 0.85
cleanupFunction · 0.85
vp9_decode_freeFunction · 0.85
oh_decode_closeFunction · 0.85

Calls 2

pthread_mutex_destroyFunction · 0.50
pthread_cond_destroyFunction · 0.50

Tested by

no test coverage detected