Lines Matching refs:ref
105 void avfilter_formats_ref(AVFilterFormats *f, AVFilterFormats **ref)
107 *ref = f;
109 f->refs[f->refcount-1] = ref;
112 static int find_ref_index(AVFilterFormats **ref)
115 for(i = 0; i < (*ref)->refcount; i ++)
116 if((*ref)->refs[i] == ref)
121 void avfilter_formats_unref(AVFilterFormats **ref)
123 int idx = find_ref_index(ref);
126 memmove((*ref)->refs + idx, (*ref)->refs + idx+1,
127 sizeof(AVFilterFormats**) * ((*ref)->refcount-idx-1));
129 if(!--(*ref)->refcount) {
130 av_free((*ref)->formats);
131 av_free((*ref)->refs);
132 av_free(*ref);
134 *ref = NULL;