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

Function av_refstruct_unref

libavutil/refstruct.c:120–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120void av_refstruct_unref(void *objp)
121{
122 void *obj;
123 RefCount *ref;
124
125 memcpy(&obj, objp, sizeof(obj));
126 if (!obj)
127 return;
128 memcpy(objp, &(void *){ NULL }, sizeof(obj));
129
130 ref = get_refcount(obj);
131 if (atomic_fetch_sub_explicit(&ref->refcount, 1, memory_order_acq_rel) == 1) {
132 if (ref->free_cb)
133 ref->free_cb(ref->opaque, obj);
134 ref->free(ref);
135 }
136
137 return;
138}
139
140void *av_refstruct_ref(void *obj)
141{

Callers 15

av_frame_unrefFunction · 0.85
av_container_fifo_freeFunction · 0.85
av_container_fifo_readFunction · 0.85
av_container_fifo_drainFunction · 0.85
av_container_fifo_writeFunction · 0.85
av_refstruct_pool_uninitFunction · 0.85
av_refstruct_replaceFunction · 0.85
ff_frame_thread_freeFunction · 0.85
ff_thread_get_ext_bufferFunction · 0.85
ff_ffv1_closeFunction · 0.85
cbs_h265_flushFunction · 0.85

Calls 1

get_refcountFunction · 0.85

Tested by

no test coverage detected