MCPcopy Create free account
hub / github.com/byhook/ffmpeg4android / uninit_options

Function uninit_options

ffmpeg-single-cmd/src/main/cpp/ffmpeg_opt.c:137–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135static int copy_unknown_streams = 0;
136
137static void uninit_options(OptionsContext *o)
138{
139 const OptionDef *po = options;
140 int i;
141
142 /* all OPT_SPEC and OPT_STRING can be freed in generic way */
143 while (po->name) {
144 void *dst = (uint8_t*)o + po->u.off;
145
146 if (po->flags & OPT_SPEC) {
147 SpecifierOpt **so = dst;
148 int i, *count = (int*)(so + 1);
149 for (i = 0; i < *count; i++) {
150 av_freep(&(*so)[i].specifier);
151 if (po->flags & OPT_STRING)
152 av_freep(&(*so)[i].u.str);
153 }
154 av_freep(so);
155 *count = 0;
156 } else if (po->flags & OPT_OFFSET && po->flags & OPT_STRING)
157 av_freep(dst);
158 po++;
159 }
160
161 for (i = 0; i < o->nb_stream_maps; i++)
162 av_freep(&o->stream_maps[i].linklabel);
163 av_freep(&o->stream_maps);
164 av_freep(&o->audio_channel_maps);
165 av_freep(&o->streamid_map);
166 av_freep(&o->attachments);
167}
168
169static void init_options(OptionsContext *o)
170{

Callers 1

open_filesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected